Skip to content

Commit

Permalink
remove double negative
Browse files Browse the repository at this point in the history
  • Loading branch information
emily-shen committed Nov 22, 2024
1 parent 6db3885 commit d470e73
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 9 deletions.
10 changes: 5 additions & 5 deletions packages/wrangler/src/__tests__/metrics.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -237,7 +237,7 @@ describe("metrics", () => {
wranglerVersion: "1.2.3",
isFirstUsage: false,
isCI: false,
isNonInteractive: false,
isInteractive: true,
argsUsed: [
"array",
"number",
Expand Down Expand Up @@ -275,7 +275,7 @@ describe("metrics", () => {
wranglerVersion: "1.2.3",
isFirstUsage: false,
isCI: false,
isNonInteractive: false,
isInteractive: true,
argsUsed: [
"array",
"number",
Expand Down Expand Up @@ -335,7 +335,7 @@ describe("metrics", () => {
wranglerVersion: "1.2.3",
isFirstUsage: false,
isCI: false,
isNonInteractive: false,
isInteractive: true,
argsUsed: [
"array",
"number",
Expand Down Expand Up @@ -374,7 +374,7 @@ describe("metrics", () => {
wranglerVersion: "1.2.3",
isFirstUsage: false,
isCI: false,
isNonInteractive: false,
isInteractive: true,
argsUsed: [
"array",
"number",
Expand Down Expand Up @@ -426,7 +426,7 @@ describe("metrics", () => {
await runWrangler("command subcommand positional");

expect(requests.count).toBe(2);
expect(std.debug).toContain('isNonInteractive":true');
expect(std.debug).toContain('"isInteractive":false,');
});

describe("banner", () => {
Expand Down
6 changes: 3 additions & 3 deletions packages/wrangler/src/metrics/metrics-dispatcher.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import chalk from "chalk";
import { fetch } from "undici";
import isInteractive from "../is-interactive";
import _isInteractive from "../is-interactive";
import { logger } from "../logger";
import { CI } from "./../is-ci";
import {
Expand Down Expand Up @@ -29,7 +29,7 @@ export function getMetricsDispatcher(options: MetricsConfigOptions) {
const packageManager = getPackageManager();
const isFirstUsage = readMetricsConfig().permission === undefined;
const isCI = CI.isCI();
const isNonInteractive = !isInteractive();
const isInteractive = _isInteractive();
const amplitude_session_id = Date.now();
let amplitude_event_id = 0;

Expand Down Expand Up @@ -83,7 +83,7 @@ export function getMetricsDispatcher(options: MetricsConfigOptions) {
packageManager,
isFirstUsage,
isCI,
isNonInteractive,
isInteractive,
argsUsed,
argsCombination,
};
Expand Down
2 changes: 1 addition & 1 deletion packages/wrangler/src/metrics/send-event.ts
Original file line number Diff line number Diff line change
Expand Up @@ -141,7 +141,7 @@ export type CommonEventProperties = {
amplitude_event_id: number;

isCI: boolean;
isNonInteractive: boolean;
isInteractive: boolean;
argsUsed: string[];
argsCombination: string;
};
Expand Down

0 comments on commit d470e73

Please sign in to comment.