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 for @cdktf/commons #3096

Merged
merged 2 commits into from
Sep 1, 2023
Merged
Show file tree
Hide file tree
Changes from 1 commit
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
4 changes: 2 additions & 2 deletions packages/@cdktf/cli-core/src/lib/error-reporting.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import {
import { logger } from "@cdktf/commons";
import * as path from "path";
import * as fs from "fs-extra";
import ciDetect from "@npmcli/ci-detect";
import ciInfo from "ci-info";

export function shouldReportCrash(
projectPath = process.cwd()
Expand Down Expand Up @@ -57,7 +57,7 @@ export async function initializErrorReporting(
runConsentPrompt?: () => Promise<boolean>
) {
let shouldReport = shouldReportCrash();
const ci: string | false = ciDetect();
const ci: string | false = ciInfo.isCI ? ciInfo.name! : false;
DanielMSchmidt marked this conversation as resolved.
Show resolved Hide resolved

// We have no info yet, so we need to ask the user
if (shouldReport === undefined && runConsentPrompt) {
Expand Down
20 changes: 10 additions & 10 deletions packages/@cdktf/commons/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -33,25 +33,25 @@
"keywords": ["cdk", "cdktf", "terraform"],
"license": "MPL-2.0",
"dependencies": {
"@npmcli/ci-detect": "^1.4.0",
"@sentry/node": "^6.19.7",
"@sentry/node": "^7.64.0",
"cdktf": "0.0.0",
"ci-info": "^3.8.0",
"codemaker": "^1.87.0",
"constructs": "^10.0.25",
"cross-spawn": "^7.0.3",
"follow-redirects": "^1.15.2",
"fs-extra": "^8.1.0",
"fs-extra": "^11.1.1",
"is-valid-domain": "^0.1.6",
"log4js": "^6.7.0",
"uuid": "^8.3.2"
"log4js": "^6.9.1",
"uuid": "^9.0.0"
},
"devDependencies": {
"@types/follow-redirects": "^1.14.1",
"@types/fs-extra": "^8.1.2",
"@types/uuid": "^8.3.4",
"jest": "^29.5.0",
"ts-jest": "^29.0.5",
"typescript": "^5.0.2"
"@types/fs-extra": "^11.0.1",
"@types/uuid": "^9.0.2",
"jest": "^29.6.2",
"ts-jest": "^29.1.1",
"typescript": "^5.1.6"
},
"eslintConfig": {
"parser": "@typescript-eslint/parser",
Expand Down
4 changes: 2 additions & 2 deletions packages/@cdktf/commons/src/checkpoint.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import https = require("https");
import { format } from "url";
import { v4 as uuidv4 } from "uuid";
import * as os from "os";
import ciDetect from "@npmcli/ci-detect";
import ciInfo from "ci-info";
import { logger, processLoggerError } from "./logging";
import * as path from "path";
import * as fs from "fs-extra";
Expand Down Expand Up @@ -170,7 +170,7 @@ export async function ReportRequest(reportParams: ReportParams): Promise<void> {
reportParams.os = os.platform();
}

const ci: string | false = ciDetect();
const ci: string | false = ciInfo.isCI ? ciInfo.name! : false;
if (!reportParams.userId && !ci) {
reportParams.userId = getUserId();
}
Expand Down
12 changes: 6 additions & 6 deletions packages/@cdktf/commons/src/logging.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,47 +11,47 @@ const logger = {
cliLogger.trace(message, ...args);
Sentry.addBreadcrumb({
message,
level: Sentry.Severity.Debug,
level: "debug",
});
},

debug(message: any, ...args: any[]) {
cliLogger.debug(message, ...args);
Sentry.addBreadcrumb({
message,
level: Sentry.Severity.Debug,
level: "debug",
});
},

info(message: any, ...args: any[]) {
cliLogger.info(message, ...args);
Sentry.addBreadcrumb({
message,
level: Sentry.Severity.Info,
level: "info",
});
},

warn(message: any, ...args: any[]) {
cliLogger.warn(message, ...args);
Sentry.addBreadcrumb({
message,
level: Sentry.Severity.Warning,
level: "warning",
});
},

error(message: any, ...args: any[]) {
cliLogger.error(message, ...args);
Sentry.addBreadcrumb({
message,
level: Sentry.Severity.Error,
level: "error",
});
},

fatal(message: any, ...args: any[]) {
cliLogger.fatal(message, ...args);
Sentry.addBreadcrumb({
message,
level: Sentry.Severity.Critical,
level: "fatal",
});
},

Expand Down
2 changes: 1 addition & 1 deletion packages/cdktf-cli/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@
"@inquirer/prompts": "^2.3.0",
"@sentry/node": "^6.19.7",
"cdktf": "0.0.0",
"ci-info": "^3.8.0",
"codemaker": "^1.87.0",
"constructs": "^10.0.25",
"cross-spawn": "^7.0.3",
Expand Down Expand Up @@ -111,7 +112,6 @@
"devDependencies": {
"@cdktf/cli-core": "0.0.0",
"@cdktf/provider-generator": "0.0.0",
"@npmcli/ci-detect": "^1.4.0",
"@skorfmann/ink-confirm-input": "^3.0.0",
"@skorfmann/terraform-cloud": "^1.15.0",
"@types/archiver": "^5.3.1",
Expand Down
Loading