Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: update dependencies #86

Merged
merged 8 commits into from
Mar 16, 2023
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
.DS_Store
node_modules
dist
.taskkey
2 changes: 1 addition & 1 deletion azure-devops-extension/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,6 @@
"author": "Andrei Bitca, Daniel Mon Chit & Lukas Kalcok",
"license": "ISC",
"devDependencies": {
"tfx-cli": "^0.9.2"
"tfx-cli": "^0.14.0"
}
}
40 changes: 16 additions & 24 deletions azure-devops-extension/run-automator-build-task/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,46 +16,38 @@
},
"author": "Andrei Bitca, Daniel Mon Chit & Lukas Kalcok",
"license": "ISC",
"resolutions": {
"cross-fetch": "3.1.5",
"minimatch": "7.4.2",
"ws": "8.12.1"
},
"devDependencies": {
"@types/jest": "^26.0.22",
"@types/nock": "^11.1.0",
"@types/node-fetch": "^2.5.7",
"@types/pino": "^6.3.2",
"@types/node-fetch": "^2.6.2",
"@types/q": "^1.5.4",
"@types/sinon": "^9.0.8",
"@typescript-eslint/eslint-plugin": "^4.1.1",
"@zerollup/ts-transform-paths": "^1.7.18",
"eslint": "^7.9.0",
"eslint-config-deepcrawl": "^5.6.0",
"eslint-plugin-array-func": "^3.1.7",
"eslint-plugin-clean-code": "^0.1.12",
"eslint-plugin-filenames": "^1.3.2",
"eslint": "^8.35.0",
"eslint-config-deepcrawl": "^8.1.0",
AndKiel marked this conversation as resolved.
Show resolved Hide resolved
"eslint-plugin-graphql": "^4.0.0",
"eslint-plugin-import": "^2.22.0",
"eslint-plugin-jest": "^24.0.2",
"eslint-plugin-json-format": "^2.0.1",
"eslint-plugin-no-loops": "^0.3.0",
"eslint-plugin-node": "^11.1.0",
"eslint-plugin-promise": "^4.2.1",
"eslint-plugin-sonarjs": "^0.5.0",
"jest": "^26.6.3",
"jest-extended": "^0.11.5",
"jest-fetch-mock": "^3.0.3",
"nock": "^13.0.4",
"nock": "^13.3.0",
"prettier": "^2.1.2",
"sinon": "^9.2.0",
"ts-jest": "^26.4.1",
"ttypescript": "^1.5.12",
"ttypescript": "^1.5.15",
"typescript": "^4.0.3",
"typescript-transform-paths": "3.4.6",
"y18n": "4.0.1"
},
"dependencies": {
"@apollo/client": "^3.2.2",
"axios": "^0.21.1",
"azure-pipelines-task-lib": "^2.11.2",
"graphql": "^15.3.0",
"node-fetch": "^2.6.1",
"pino": "^6.7.0",
"pino-pretty": "^4.3.0"
"azure-pipelines-task-lib": "^4.3.0",
"graphql": "^16.6.0",
"node-fetch": "^2.6.9",
"pino": "^8.11.0",
"pino-pretty": "^9.4.0"
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,6 @@ describe("#sleep", () => {
await sleep(1000);
const endTimeStamp = Date.now();
const secondsPassed = Math.floor((endTimeStamp - startTimeStamp) / 1000);
expect(secondsPassed).toEqual(1);
expect(secondsPassed).toBe(1);
});
});
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
import * as pino from "pino";
import pino from "pino";

export const loggerService = pino({
level: "info",
prettyPrint: true,
transport: {
target: "pino-pretty",
}
});
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import azurePipelinesTask = require("azure-pipelines-task-lib");
import azurePipelinesTask = require("azure-pipelines-task-lib/task");

import { inputParameters } from "@common/constants";
import { loggerService } from "@common/services/logger.service";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ describe("AutomatorSDKClient", () => {
ciBuildId,
}),
).rejects.toEqual(new Error(testSuiteId));
expect(deleteAuthTokenSpy.calledOnceWith(`${userKeyId}|${userKeySecret}`)).toEqual(true);
expect(deleteAuthTokenSpy.calledOnceWith(`${userKeyId}|${userKeySecret}`)).toBe(true);
});

it("should throw error and delete token if tools api client #poll throws error", async () => {
Expand Down Expand Up @@ -70,8 +70,8 @@ describe("AutomatorSDKClient", () => {
ciBuildId,
isStartOnly: true,
});
expect(pollSpy.notCalled).toEqual(true);
expect(deleteAuthTokenSpy.calledOnceWith(`${userKeyId}|${userKeySecret}`)).toEqual(true);
expect(pollSpy.notCalled).toBe(true);
expect(deleteAuthTokenSpy.calledOnceWith(`${userKeyId}|${userKeySecret}`)).toBe(true);
});

it("should delete token in the end", async () => {
Expand All @@ -85,7 +85,7 @@ describe("AutomatorSDKClient", () => {
testSuiteId,
ciBuildId,
});
expect(deleteAuthTokenSpy.calledOnceWith(`${userKeyId}|${userKeySecret}`)).toEqual(true);
expect(deleteAuthTokenSpy.calledOnceWith(`${userKeyId}|${userKeySecret}`)).toBe(true);
});
});
});
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,7 @@ Object {
token
__typename
}
}
",
}",
"variables": Object {},
}
`;
Expand All @@ -23,8 +22,7 @@ Object {
token
__typename
}
}
",
}",
"variables": Object {
"userKeyId": "user-key-id",
"userKeySecret": "user-key-secret",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,9 @@ describe("GraphAPIClient", () => {
},
];
});
expect(await graphAPIClient.getAuthToken(userKeyId, userKeySecret)).toEqual(`${userKeyId},${userKeySecret}`);
await expect(graphAPIClient.getAuthToken(userKeyId, userKeySecret)).resolves.toBe(
`${userKeyId},${userKeySecret}`,
);
});
});

Expand Down Expand Up @@ -73,7 +75,7 @@ describe("GraphAPIClient", () => {
},
];
});
expect(await graphAPIClient.deleteAuthToken(token)).toEqual(token);
await expect(graphAPIClient.deleteAuthToken(token)).resolves.toEqual(token);
});
});
});
Original file line number Diff line number Diff line change
Expand Up @@ -28,10 +28,10 @@ describe("ToolsAPIClient", () => {
testSuiteId,
ciBuildId,
});
expect(this.req.headers["content-type"]).toEqual("application/json");
expect(this.req.headers["content-type"]).toBe("application/json");
return [200, { buildId }];
});
expect(await toolsAPIClient.startBuild(authToken, testSuiteId, ciBuildId)).toEqual(buildId);
await expect(toolsAPIClient.startBuild(authToken, testSuiteId, ciBuildId)).resolves.toEqual(buildId);
});
});

Expand All @@ -51,7 +51,7 @@ describe("ToolsAPIClient", () => {
authToken,
buildId,
});
expect(this.req.headers["content-type"]).toEqual("application/json");
expect(this.req.headers["content-type"]).toBe("application/json");
return [200, { passed: true }];
});
await toolsAPIClient.poll(authToken, buildId);
Expand All @@ -71,7 +71,7 @@ describe("ToolsAPIClient", () => {
nock(baseURL)
.post(pollBuildResultsPath)
.reply(function () {
expect(true).toEqual(true);
expect(true).toBe(true);
return [200, { passed: true }];
});
return [202];
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ export class ToolsAPIClient implements IToolsAPIClient {
baseURL,
startBuildPath,
pollBuildResultsPath,
}: Pick<IToolsAPIClientOptions, "baseURL" | "startBuildPath" | "pollBuildResultsPath">): Map<ToolsAPIRoute, string> {
}: Pick<IToolsAPIClientOptions, "baseURL" | "pollBuildResultsPath" | "startBuildPath">): Map<ToolsAPIRoute, string> {
const routes = new Map<ToolsAPIRoute, string>();
routes.set(ToolsAPIRoute.StartBuild, `${baseURL}${startBuildPath}`);
routes.set(ToolsAPIRoute.PollBuildResults, `${baseURL}${pollBuildResultsPath}`);
Expand Down
11 changes: 3 additions & 8 deletions azure-devops-extension/run-automator-build-task/tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"compilerOptions": {
"target": "es2019",
"lib": ["es2019", "esnext"],
"target": "es2021",
"lib": ["es2021", "esnext"],
"moduleResolution": "node",
"module": "commonjs",
"outDir": "dist",
Expand All @@ -18,12 +18,7 @@
"@tests/*": ["__tests__/*"],
"@src/*": ["*"]
},
"plugins": [
{
"transform": "@zerollup/ts-transform-paths",
"exclude": ["*"]
}
]
"plugins": [{ "transform": "typescript-transform-paths" }]
},
"include": ["src"]
}
Loading