Skip to content

Commit

Permalink
v3,4,5: Fix telemetry account hash (#21)
Browse files Browse the repository at this point in the history
  • Loading branch information
qetza authored Mar 19, 2024
1 parent a5415f5 commit 3dd89c0
Show file tree
Hide file tree
Showing 16 changed files with 67 additions and 15 deletions.
10 changes: 10 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,14 @@
# Changelog
## 5.0.5
Task 5.3.3
- Fix telemetry account hash.

Task 4.4.3
- Fix telemetry account hash.

Task 3.12.3
- Fix telemetry account hash.

## 5.0.4
Task 6.0.4
- Update @qetza/replacetokens to 1.4.0.
Expand Down
3 changes: 3 additions & 0 deletions tasks/ReplaceTokensV3/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
# Changelog
## 3.12.3
- Fix telemetry account hash.

## 3.12.2
- Change telemetry provider.

Expand Down
2 changes: 1 addition & 1 deletion tasks/ReplaceTokensV3/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -499,7 +499,7 @@ async function run() {
// initialize telemetry (outside of try as needed in catch and finally)
let telemetryEnabled = false;
let telemetryEvent = new TelemetryEvent(
tl.getVariable('ystem.collectionid'),
tl.getVariable('system.collectionid'),
`${tl.getVariable('system.teamprojectid')}${tl.getVariable('system.definitionid')}`
);

Expand Down
2 changes: 1 addition & 1 deletion tasks/ReplaceTokensV3/task.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
"version": {
"Major": 3,
"Minor": 12,
"Patch": 2
"Patch": 3
},
"instanceNameFormat": "Replace tokens in $(targetFiles)",
"minimumAgentVersion": "2.105.0",
Expand Down
4 changes: 2 additions & 2 deletions tasks/ReplaceTokensV3/tests/L0.ts
Original file line number Diff line number Diff line change
Expand Up @@ -167,7 +167,7 @@ describe('ReplaceTokens v3 L0 suite', function () {

tr.stdout.should.include('telemetry sent');
tr.stdout.should.match(
/\[\{"account":"e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855","pipeline":"b98ed03d3eec376dcc015365c1a944e3ebbcc33d30e3261af3f4e4abb107aa82","host":"server","os":"Windows","result":"failed","eventType":"TokensReplaced","application":"replacetokens-task","version":"3.0.0"}]/
/\[\{"account":"494d0aad9d06c4ddb51d5300620122ce55366a9382b3cc2835ed5f0e2e67b4d0","pipeline":"b98ed03d3eec376dcc015365c1a944e3ebbcc33d30e3261af3f4e4abb107aa82","host":"server","os":"Windows","result":"failed","eventType":"TokensReplaced","application":"replacetokens-task","version":"3.0.0"}]/
);
},
tr,
Expand All @@ -192,7 +192,7 @@ describe('ReplaceTokens v3 L0 suite', function () {

tr.stdout.should.include('telemetry sent');
tr.stdout.should.match(
/\[\{"account":"e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855","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":"","actionOnNoFiles":"continue","inlineVariables":0,"enableRecursion":false,"useLegacyEmptyFeature":false,"useDefaultValue":false,"duration":\d+(?:\.\d+)?,"tokenReplaced":1,"tokenFound":1,"defaultValueReplaced":0,"fileProcessed":1,"transformExecuted":0,"eventType":"TokensReplaced","application":"replacetokens-task","version":"3.0.0"}]/
/\[\{"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":"","actionOnNoFiles":"continue","inlineVariables":0,"enableRecursion":false,"useLegacyEmptyFeature":false,"useDefaultValue":false,"duration":\d+(?:\.\d+)?,"tokenReplaced":1,"tokenFound":1,"defaultValueReplaced":0,"fileProcessed":1,"transformExecuted":0,"eventType":"TokensReplaced","application":"replacetokens-task","version":"3.0.0"}]/
);
},
tr,
Expand Down
3 changes: 3 additions & 0 deletions tasks/ReplaceTokensV4/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
# Changelog
## 4.4.3
- Fix telemetry account hash.

## 4.4.2
- Change telemetry provider.

Expand Down
2 changes: 1 addition & 1 deletion tasks/ReplaceTokensV4/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -499,7 +499,7 @@ async function run() {
// initialize telemetry (outside of try as needed in catch and finally)
let telemetryEnabled = false;
let telemetryEvent = new TelemetryEvent(
tl.getVariable('ystem.collectionid'),
tl.getVariable('system.collectionid'),
`${tl.getVariable('system.teamprojectid')}${tl.getVariable('system.definitionid')}`
);

Expand Down
2 changes: 1 addition & 1 deletion tasks/ReplaceTokensV4/task.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
"version": {
"Major": 4,
"Minor": 4,
"Patch": 2
"Patch": 3
},
"releaseNotes": "Added output variables (breaking change).<br/>Added token pattern dropdown (breaking change).",
"instanceNameFormat": "Replace tokens in $(targetFiles)",
Expand Down
4 changes: 2 additions & 2 deletions tasks/ReplaceTokensV4/tests/L0.ts
Original file line number Diff line number Diff line change
Expand Up @@ -167,7 +167,7 @@ describe('ReplaceTokens v4 L0 suite', function () {

tr.stdout.should.include('telemetry sent');
tr.stdout.should.match(
/\[\{"account":"e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855","pipeline":"b98ed03d3eec376dcc015365c1a944e3ebbcc33d30e3261af3f4e4abb107aa82","host":"server","os":"Windows","result":"failed","eventType":"TokensReplaced","application":"replacetokens-task","version":"4.0.0"}]/
/\[\{"account":"494d0aad9d06c4ddb51d5300620122ce55366a9382b3cc2835ed5f0e2e67b4d0","pipeline":"b98ed03d3eec376dcc015365c1a944e3ebbcc33d30e3261af3f4e4abb107aa82","host":"server","os":"Windows","result":"failed","eventType":"TokensReplaced","application":"replacetokens-task","version":"4.0.0"}]/
);
},
tr,
Expand All @@ -192,7 +192,7 @@ describe('ReplaceTokens v4 L0 suite', function () {

tr.stdout.should.include('telemetry sent');
tr.stdout.should.match(
/\[\{"account":"e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855","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,"duration":\d+(?:\.\d+)?,"tokenReplaced":1,"tokenFound":1,"defaultValueReplaced":0,"fileProcessed":1,"transformExecuted":0,"eventType":"TokensReplaced","application":"replacetokens-task","version":"4.0.0"}]/
/\[\{"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,"duration":\d+(?:\.\d+)?,"tokenReplaced":1,"tokenFound":1,"defaultValueReplaced":0,"fileProcessed":1,"transformExecuted":0,"eventType":"TokensReplaced","application":"replacetokens-task","version":"4.0.0"}]/
);
},
tr,
Expand Down
3 changes: 3 additions & 0 deletions tasks/ReplaceTokensV5/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
# Changelog
## 5.3.3
- Fix telemetry account hash.

## 5.3.2
- Change telemetry provider.

Expand Down
2 changes: 1 addition & 1 deletion tasks/ReplaceTokensV5/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -498,7 +498,7 @@ async function run() {
// initialize telemetry (outside of try as needed in catch and finally)
let telemetryEnabled = false;
let telemetryEvent = new TelemetryEvent(
tl.getVariable('ystem.collectionid'),
tl.getVariable('system.collectionid'),
`${tl.getVariable('system.teamprojectid')}${tl.getVariable('system.definitionid')}`
);

Expand Down
2 changes: 1 addition & 1 deletion tasks/ReplaceTokensV5/task.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
"version": {
"Major": 5,
"Minor": 3,
"Patch": 2
"Patch": 3
},
"releaseNotes": "Migrate to Node10 handler (breaking change).<br/>Add Node16 handler.",
"instanceNameFormat": "Replace tokens in $(targetFiles)",
Expand Down
4 changes: 2 additions & 2 deletions tasks/ReplaceTokensV5/tests/L0.ts
Original file line number Diff line number Diff line change
Expand Up @@ -166,7 +166,7 @@ describe('ReplaceTokens v5 L0 suite', function () {

tr.stdout.should.include('telemetry sent');
tr.stdout.should.match(
/\[\{"account":"e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855","pipeline":"b98ed03d3eec376dcc015365c1a944e3ebbcc33d30e3261af3f4e4abb107aa82","host":"server","os":"Windows","result":"failed","eventType":"TokensReplaced","application":"replacetokens-task","version":"5.0.0"}]/
/\[\{"account":"494d0aad9d06c4ddb51d5300620122ce55366a9382b3cc2835ed5f0e2e67b4d0","pipeline":"b98ed03d3eec376dcc015365c1a944e3ebbcc33d30e3261af3f4e4abb107aa82","host":"server","os":"Windows","result":"failed","eventType":"TokensReplaced","application":"replacetokens-task","version":"5.0.0"}]/
);
},
tr,
Expand All @@ -191,7 +191,7 @@ describe('ReplaceTokens v5 L0 suite', function () {

tr.stdout.should.include('telemetry sent');
tr.stdout.should.match(
/\[\{"account":"e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855","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,"duration":\d+(?:\.\d+)?,"tokenReplaced":1,"tokenFound":1,"defaultValueReplaced":0,"fileProcessed":1,"transformExecuted":0,"eventType":"TokensReplaced","application":"replacetokens-task","version":"5.0.0"}]/
/\[\{"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,"duration":\d+(?:\.\d+)?,"tokenReplaced":1,"tokenFound":1,"defaultValueReplaced":0,"fileProcessed":1,"transformExecuted":0,"eventType":"TokensReplaced","application":"replacetokens-task","version":"5.0.0"}]/
);
},
tr,
Expand Down
34 changes: 33 additions & 1 deletion tasks/ReplaceTokensV6/package-lock.json

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

3 changes: 2 additions & 1 deletion tasks/ReplaceTokensV6/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,8 @@
"@qetza/replacetokens": "^1.4.0",
"axios": "^1.6.7",
"azure-pipelines-task-lib": "^4.1.0",
"js-yaml": "^4.1.0"
"js-yaml": "^4.1.0",
"replacetokens-task": "file:../.."
},
"devDependencies": {
"@types/chai": "^4.3.12",
Expand Down
2 changes: 1 addition & 1 deletion vss-extension.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"manifestVersion": 1,
"id": "replacetokens",
"name": "Replace Tokens",
"version": "5.0.4",
"version": "5.0.5",
"public": true,
"publisher": "qetza",
"targets": [
Expand Down

0 comments on commit 3dd89c0

Please sign in to comment.