Skip to content

Commit e1a61b2

Browse files
committed
remove anonymous telemetry stuff
1 parent 88ad3e1 commit e1a61b2

32 files changed

+48
-1112
lines changed

.env.example

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,3 @@ MAILING_SES_PASSWORD=
1414
MAILING_DATABASE_URL_TEST=
1515
WEB_DATABASE_URL_TEST=
1616
# Note: MAILING_SESSION_PASSWORD must also be set for integration tests to run
17-
18-
## Anonymous telemetry
19-
POSTHOG_API_KEY=

packages/cli/package.json

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,6 @@
8484
"nodemailer": "6.8.0",
8585
"open": "^8.4.0",
8686
"postcss": "^8.4.16",
87-
"posthog-node": "^2.2.3",
8887
"prettier": "^2.7.1",
8988
"prisma": "^4.4.0",
9089
"prompts": "^2.4.2",

packages/cli/src/commands/__test__/exportPreviews.test.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,6 @@ describe("exportPreviews command", () => {
1414
typescript: true,
1515
emailsDir: "./packages/cli/src/__mocks__/emails",
1616
outDir: "./previews_html",
17-
anonymousId: "TEST_VALUE",
1817
}));
1918
});
2019

packages/cli/src/commands/exportPreviews.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,6 @@ export type ExportPreviewsArgs = ArgumentsCamelCase<{
1515
outDir?: string;
1616
quiet?: boolean;
1717
minify?: boolean;
18-
anonymousId?: string | null;
1918
skipLint?: boolean;
2019
}>;
2120

packages/cli/src/commands/init.ts

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,6 @@ export type InitArguments = ArgumentsCamelCase<{
1515
typescript?: boolean;
1616
port?: number;
1717
quiet?: boolean;
18-
anonymousId?: string | null;
1918
}>;
2019

2120
export const command = ["$0", "init"];
@@ -106,7 +105,6 @@ export const handler = buildHandler(
106105
port: argv.port,
107106
quiet: argv.quiet,
108107
emailsDir: argv.emailsDir,
109-
anonymousId: argv.anonymousId,
110108
$0: argv.$0,
111109
_: argv._,
112110
};

packages/cli/src/commands/preview/preview.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@ export type PreviewArgs = ArgumentsCamelCase<{
77
port?: number;
88
quiet?: boolean;
99
emailsDir?: string;
10-
anonymousId?: string | null;
1110
}>;
1211

1312
export const command = "preview";

packages/cli/src/commands/preview/server/start.ts

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@ import open from "open";
44
import next from "next";
55
import { pathExists } from "fs-extra";
66
import { parse } from "url";
7-
import { shutdown as shutdownAnalytics } from "../../../util/postHog";
87

98
import { getPreviewsDirectory } from "../../../util/paths";
109
import { error, log, debug } from "../../../util/serverLogger";
@@ -130,7 +129,6 @@ export default async function startPreviewServer() {
130129
.on("error", async function onServerError(e: NodeJS.ErrnoException) {
131130
if (e.code === "EADDRINUSE") {
132131
error(`port ${port} is taken, is mailing already running?`);
133-
await shutdownAnalytics();
134132
process.exit(1);
135133
} else {
136134
error("preview server error:", JSON.stringify(e));

packages/cli/src/commands/server.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,6 @@ export type ServerArguments = ArgumentsCamelCase<{
1313
port?: number;
1414
quiet?: boolean;
1515
subcommand?: string;
16-
anonymousId?: string | null;
1716
}>;
1817

1918
export const command = ["server [subcommand]"];

packages/cli/src/components/PosthogScript.tsx

Lines changed: 0 additions & 30 deletions
This file was deleted.

packages/cli/src/custom.d.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,6 @@ type HtmlLintError = {
3838
type ViewMode = "desktop" | "mobile" | "html";
3939

4040
type MailingConfig = {
41-
anonymousId?: string | null;
4241
emailsDir?: string;
4342
port?: number;
4443
quiet?: boolean;

0 commit comments

Comments
 (0)