Skip to content

Commit cf1d93c

Browse files
authored
Merge branch 'main' into austinmerrick/fix-corepack-detection-on-monorepos
2 parents 2f9d1ff + 582193a commit cf1d93c

File tree

6 files changed

+41
-8
lines changed

6 files changed

+41
-8
lines changed

.changeset/rude-waves-check.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
"vercel": patch
3+
---
4+
5+
[cli] set telemetry enabled to false with VERCEL_TELEMETRY_DISABLED

.changeset/twenty-swans-lick.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
"vercel": patch
3+
---
4+
5+
[cli] Remove incorrect --output docs for `vercel certs`

packages/cli/src/commands/certs/command.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,6 @@ export const certsCommand = {
8989
description: 'Show next page of results',
9090
},
9191
{ name: 'overwrite', shorthand: null, type: Boolean, deprecated: false },
92-
{ name: 'output', shorthand: null, type: String, deprecated: false },
9392
],
9493
examples: [
9594
{

packages/cli/src/util/telemetry/index.ts

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -172,7 +172,11 @@ export class TelemetryEventStore {
172172
this.events = [];
173173
}
174174

175-
enabled() {
175+
get enabled() {
176+
if (process.env.VERCEL_TELEMETRY_DISABLED) {
177+
return false;
178+
}
179+
176180
return this.config?.enabled === false ? false : true;
177181
}
178182

@@ -188,7 +192,7 @@ export class TelemetryEventStore {
188192
return;
189193
}
190194

191-
if (this.enabled()) {
195+
if (this.enabled) {
192196
// send events to the server
193197
}
194198
}

packages/cli/test/unit/index.test.ts

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,7 @@ describe('main', () => {
4545
{ key: 'cpu_count', value: '1' },
4646
]);
4747
});
48+
4849
it('tracks platform', () => {
4950
vi.spyOn(os, 'platform').mockImplementation(() => 'linux');
5051
const output = new Output(process.stderr, {
@@ -68,6 +69,7 @@ describe('main', () => {
6869
{ key: 'platform', value: 'linux' },
6970
]);
7071
});
72+
7173
it('tracks arch', () => {
7274
vi.spyOn(os, 'arch').mockImplementation(() => 'x86');
7375
const output = new Output(process.stderr, {
@@ -140,6 +142,28 @@ describe('main', () => {
140142
});
141143
});
142144

145+
describe('tracking enabled', () => {
146+
it('is false when VERCEL_TELEMETRY_DISABLED set', () => {
147+
const configThatWillBeIgnoredAnyway = {
148+
enabled: true,
149+
};
150+
151+
vi.stubEnv('VERCEL_TELEMETRY_DISABLED', '1');
152+
const output = new Output(process.stderr, {
153+
debug: true,
154+
noColor: false,
155+
});
156+
157+
const telemetryEventStore = new TelemetryEventStore({
158+
isDebug: true,
159+
output,
160+
config: configThatWillBeIgnoredAnyway,
161+
});
162+
163+
expect(telemetryEventStore.enabled).toBe(false);
164+
});
165+
});
166+
143167
describe('CI Vendor Name', () => {
144168
let telemetry: RootTelemetryClient;
145169
let telemetryEventStore: TelemetryEventStore;

packages/sdk/README.md

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -19,11 +19,7 @@ The `@vercel/sdk` is a type-safe Typescript SDK that gives you full control over
1919
</a>
2020
</div>
2121

22-
<!-- Start Summary [summary] -->
23-
## Summary
24-
25-
Vercel API: Vercel combines the best developer experience with an obsessive focus on end-user performance. Our platform enables frontend teams to do their best work.
26-
<!-- End Summary [summary] -->
22+
<!-- No Summary [summary] -->
2723

2824
<!-- Start Table of Contents [toc] -->
2925
## Table of Contents

0 commit comments

Comments
 (0)