Skip to content

Commit fcfe02c

Browse files
committed
fix type issues
1 parent ea0aed2 commit fcfe02c

25 files changed

+100
-30
lines changed

packages/bundler-plugin-core/src/sentry/__tests__/telemetry.test.ts

Lines changed: 12 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -23,42 +23,24 @@ afterEach(() => {
2323
describe("telemetry", () => {
2424
describe("createSentryInstance", () => {
2525
it("creates instance with telemetry enabled", () => {
26-
const options = {
27-
telemetry: true,
28-
dryRun: false,
29-
} as NormalizedOptions;
30-
const pluginInfo = {
31-
name: "test-plugin",
32-
version: "1.0.0",
33-
};
34-
35-
const { sentryClient, sentryScope } = createSentryInstance(
36-
true,
37-
false,
38-
pluginInfo,
39-
options,
40-
);
26+
const { sentryClient, sentryScope } = createSentryInstance({
27+
enableTelemetry: true,
28+
isDryRun: false,
29+
pluginName: "test-plugin",
30+
pluginVersion: "1.0.0",
31+
});
4132

4233
expect(sentryClient).toBeDefined();
4334
expect(sentryScope).toBeDefined();
4435
});
4536

4637
it("creates instance with telemetry disabled", () => {
47-
const options = {
48-
telemetry: false,
49-
dryRun: false,
50-
} as NormalizedOptions;
51-
const pluginInfo = {
52-
name: "test-plugin",
53-
version: "1.0.0",
54-
};
55-
56-
const { sentryClient, sentryScope } = createSentryInstance(
57-
false,
58-
false,
59-
pluginInfo,
60-
options,
61-
);
38+
const { sentryClient, sentryScope } = createSentryInstance({
39+
enableTelemetry: false,
40+
isDryRun: false,
41+
pluginName: "test-plugin",
42+
pluginVersion: "1.0.0",
43+
});
6244

6345
expect(sentryClient).toBeDefined();
6446
expect(sentryScope).toBeDefined();

packages/bundler-plugin-core/src/utils/__tests__/provider.test.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,7 @@ describe("detectProvider", () => {
4747
dryRun: true,
4848
enableBundleAnalysis: true,
4949
retryCount: 0,
50+
telemetry: false,
5051
});
5152

5253
const result = await detectProvider(inputs, output);
@@ -65,6 +66,7 @@ describe("detectProvider", () => {
6566
dryRun: true,
6667
enableBundleAnalysis: true,
6768
retryCount: 0,
69+
telemetry: false,
6870
});
6971

7072
try {

packages/bundler-plugin-core/src/utils/providers/__tests__/AppVeyorCI.test.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -88,6 +88,7 @@ describe("AppveyorCI Params", () => {
8888
dryRun: true,
8989
enableBundleAnalysis: true,
9090
retryCount: 0,
91+
telemetry: false,
9192
});
9293
const params = await AppVeyorCI.getServiceParams(inputs, output);
9394
expect(params).toMatchObject(expected);
@@ -130,6 +131,7 @@ describe("AppveyorCI Params", () => {
130131
dryRun: true,
131132
enableBundleAnalysis: true,
132133
retryCount: 0,
134+
telemetry: false,
133135
});
134136
const params = await AppVeyorCI.getServiceParams(inputs, output);
135137
expect(params).toMatchObject(expected);
@@ -171,6 +173,7 @@ describe("AppveyorCI Params", () => {
171173
dryRun: true,
172174
enableBundleAnalysis: true,
173175
retryCount: 0,
176+
telemetry: false,
174177
});
175178
const params = await AppVeyorCI.getServiceParams(inputs, output);
176179
expect(params).toMatchObject(expected);
@@ -200,6 +203,7 @@ describe("AppveyorCI Params", () => {
200203
dryRun: true,
201204
enableBundleAnalysis: true,
202205
retryCount: 0,
206+
telemetry: false,
203207
});
204208
const params = await AppVeyorCI.getServiceParams(inputs, output);
205209
expect(params).toMatchObject(expected);

packages/bundler-plugin-core/src/utils/providers/__tests__/AzurePipelines.test.ts

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -65,6 +65,7 @@ describe("Azure Pipelines CI Params", () => {
6565
dryRun: true,
6666
enableBundleAnalysis: true,
6767
retryCount: 0,
68+
telemetry: false,
6869
});
6970
const params = await AzurePipelines.getServiceParams(inputs, output);
7071
expect(params).toMatchObject(expected);
@@ -107,6 +108,7 @@ describe("Azure Pipelines CI Params", () => {
107108
dryRun: true,
108109
enableBundleAnalysis: true,
109110
retryCount: 0,
111+
telemetry: false,
110112
});
111113
const params = await AzurePipelines.getServiceParams(inputs, output);
112114
expect(params).toMatchObject(expected);
@@ -149,6 +151,7 @@ describe("Azure Pipelines CI Params", () => {
149151
dryRun: true,
150152
enableBundleAnalysis: true,
151153
retryCount: 0,
154+
telemetry: false,
152155
});
153156
const params = await AzurePipelines.getServiceParams(inputs, output);
154157
expect(params).toMatchObject(expected);
@@ -194,6 +197,7 @@ describe("Azure Pipelines CI Params", () => {
194197
dryRun: true,
195198
enableBundleAnalysis: true,
196199
retryCount: 0,
200+
telemetry: false,
197201
});
198202
const params = await AzurePipelines.getServiceParams(inputs, output);
199203
expect(params).toMatchObject(expected);
@@ -240,6 +244,7 @@ describe("Azure Pipelines CI Params", () => {
240244
dryRun: true,
241245
enableBundleAnalysis: true,
242246
retryCount: 0,
247+
telemetry: false,
243248
});
244249
const params = await AzurePipelines.getServiceParams(inputs, output);
245250
expect(params).toMatchObject(expected);
@@ -280,6 +285,7 @@ describe("Azure Pipelines CI Params", () => {
280285
dryRun: true,
281286
enableBundleAnalysis: true,
282287
retryCount: 0,
288+
telemetry: false,
283289
});
284290
const params = await AzurePipelines.getServiceParams(inputs, output);
285291
expect(params).toMatchObject(expected);

packages/bundler-plugin-core/src/utils/providers/__tests__/Bitbucket.test.ts

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -69,6 +69,7 @@ describe("Bitbucket Params", () => {
6969
dryRun: true,
7070
enableBundleAnalysis: true,
7171
retryCount: 0,
72+
telemetry: false,
7273
});
7374
const params = await Bitbucket.getServiceParams(inputs, output);
7475
expect(params).toMatchObject(expected);
@@ -104,6 +105,7 @@ describe("Bitbucket Params", () => {
104105
dryRun: true,
105106
enableBundleAnalysis: true,
106107
retryCount: 0,
108+
telemetry: false,
107109
});
108110
const params = await Bitbucket.getServiceParams(inputs, output);
109111
expect(params).toMatchObject(expected);
@@ -138,6 +140,7 @@ describe("Bitbucket Params", () => {
138140
dryRun: true,
139141
enableBundleAnalysis: true,
140142
retryCount: 0,
143+
telemetry: false,
141144
});
142145
const params = await Bitbucket.getServiceParams(inputs, output);
143146
expect(params).toMatchObject(expected);
@@ -180,6 +183,7 @@ describe("Bitbucket Params", () => {
180183
dryRun: true,
181184
enableBundleAnalysis: true,
182185
retryCount: 0,
186+
telemetry: false,
183187
});
184188
const params = await Bitbucket.getServiceParams(inputs, output);
185189
expect(params).toMatchObject(expected);
@@ -224,6 +228,7 @@ describe("Bitbucket Params", () => {
224228
dryRun: true,
225229
enableBundleAnalysis: true,
226230
retryCount: 0,
231+
telemetry: false,
227232
});
228233
const params = await Bitbucket.getServiceParams(inputs, output);
229234
expect(params).toMatchObject(expected);

packages/bundler-plugin-core/src/utils/providers/__tests__/Bitrise.test.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -84,6 +84,7 @@ describe("Bitrise Params", () => {
8484
dryRun: true,
8585
enableBundleAnalysis: true,
8686
retryCount: 0,
87+
telemetry: false,
8788
});
8889
const params = await Bitrise.getServiceParams(inputs, output);
8990
expect(params).toMatchObject(expected);
@@ -128,6 +129,7 @@ describe("Bitrise Params", () => {
128129
dryRun: true,
129130
enableBundleAnalysis: true,
130131
retryCount: 0,
132+
telemetry: false,
131133
});
132134
const params = await Bitrise.getServiceParams(inputs, output);
133135
expect(params).toMatchObject(expected);
@@ -172,6 +174,7 @@ describe("Bitrise Params", () => {
172174
dryRun: true,
173175
enableBundleAnalysis: true,
174176
retryCount: 0,
177+
telemetry: false,
175178
});
176179
const params = await Bitrise.getServiceParams(inputs, output);
177180
expect(params).toMatchObject(expected);
@@ -226,6 +229,7 @@ describe("Bitrise Params", () => {
226229
dryRun: true,
227230
enableBundleAnalysis: true,
228231
retryCount: 0,
232+
telemetry: false,
229233
});
230234
const params = await Bitrise.getServiceParams(inputs, output);
231235
expect(params).toMatchObject(expected);

packages/bundler-plugin-core/src/utils/providers/__tests__/Buildkite.test.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -68,6 +68,7 @@ describe("Buildkite Params", () => {
6868
dryRun: true,
6969
enableBundleAnalysis: true,
7070
retryCount: 0,
71+
telemetry: false,
7172
});
7273
const params = await Buildkite.getServiceParams(inputs, output);
7374
expect(params).toMatchObject(expected);
@@ -108,6 +109,7 @@ describe("Buildkite Params", () => {
108109
dryRun: true,
109110
enableBundleAnalysis: true,
110111
retryCount: 0,
112+
telemetry: false,
111113
});
112114
const params = await Buildkite.getServiceParams(inputs, output);
113115
expect(params).toMatchObject(expected);

packages/bundler-plugin-core/src/utils/providers/__tests__/CircleCI.test.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -71,6 +71,7 @@ describe("CircleCI Params", () => {
7171
dryRun: true,
7272
enableBundleAnalysis: true,
7373
retryCount: 0,
74+
telemetry: false,
7475
});
7576
const params = await CircleCI.getServiceParams(inputs, output);
7677
expect(params).toMatchObject(expected);
@@ -109,6 +110,7 @@ describe("CircleCI Params", () => {
109110
dryRun: true,
110111
enableBundleAnalysis: true,
111112
retryCount: 0,
113+
telemetry: false,
112114
});
113115
const params = await CircleCI.getServiceParams(inputs, output);
114116
expect(params).toMatchObject(expected);
@@ -154,6 +156,7 @@ describe("CircleCI Params", () => {
154156
dryRun: true,
155157
enableBundleAnalysis: true,
156158
retryCount: 0,
159+
telemetry: false,
157160
});
158161
const params = await CircleCI.getServiceParams(inputs, output);
159162
expect(params).toMatchObject(expected);

packages/bundler-plugin-core/src/utils/providers/__tests__/Cirrus.test.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -68,6 +68,7 @@ describe("Cirrus Params", () => {
6868
dryRun: true,
6969
enableBundleAnalysis: true,
7070
retryCount: 0,
71+
telemetry: false,
7172
});
7273
const params = await Cirrus.getServiceParams(inputs, output);
7374
expect(params).toMatchObject(expected);
@@ -114,6 +115,7 @@ describe("Cirrus Params", () => {
114115
dryRun: true,
115116
enableBundleAnalysis: true,
116117
retryCount: 0,
118+
telemetry: false,
117119
});
118120
const params = await Cirrus.getServiceParams(inputs, output);
119121
expect(params).toMatchObject(expected);

packages/bundler-plugin-core/src/utils/providers/__tests__/CloudflarePages.test.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -65,6 +65,7 @@ describe("CloudflarePages Params", () => {
6565
dryRun: true,
6666
enableBundleAnalysis: true,
6767
retryCount: 0,
68+
telemetry: false,
6869
});
6970
const params = await CloudflarePages.getServiceParams(inputs, output);
7071
expect(params).toMatchObject(expected);
@@ -104,6 +105,7 @@ describe("CloudflarePages Params", () => {
104105
dryRun: true,
105106
enableBundleAnalysis: true,
106107
retryCount: 0,
108+
telemetry: false,
107109
});
108110
const params = await CloudflarePages.getServiceParams(inputs, output);
109111
expect(params).toMatchObject(expected);
@@ -133,6 +135,7 @@ describe("CloudflarePages Params", () => {
133135
dryRun: true,
134136
enableBundleAnalysis: true,
135137
retryCount: 0,
138+
telemetry: false,
136139
});
137140
const params = await CloudflarePages.getServiceParams(inputs, output);
138141
expect(params).toMatchObject(expected);

packages/bundler-plugin-core/src/utils/providers/__tests__/CodeBuild.test.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -68,6 +68,7 @@ describe("CodeBuild Params", () => {
6868
dryRun: true,
6969
enableBundleAnalysis: true,
7070
retryCount: 0,
71+
telemetry: false,
7172
});
7273
const params = await CodeBuild.getServiceParams(inputs, output);
7374
expect(params).toMatchObject(expected);
@@ -113,6 +114,7 @@ describe("CodeBuild Params", () => {
113114
dryRun: true,
114115
enableBundleAnalysis: true,
115116
retryCount: 0,
117+
telemetry: false,
116118
});
117119
const params = await CodeBuild.getServiceParams(inputs, output);
118120
expect(params).toMatchObject(expected);

packages/bundler-plugin-core/src/utils/providers/__tests__/Drone.test.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -68,6 +68,7 @@ describe("Drone Params", () => {
6868
dryRun: true,
6969
enableBundleAnalysis: true,
7070
retryCount: 0,
71+
telemetry: false,
7172
});
7273
const params = await Drone.getServiceParams(inputs, output);
7374
expect(params).toMatchObject(expected);
@@ -115,6 +116,7 @@ describe("Drone Params", () => {
115116
dryRun: true,
116117
enableBundleAnalysis: true,
117118
retryCount: 0,
119+
telemetry: false,
118120
});
119121
const params = await Drone.getServiceParams(inputs, output);
120122
expect(params).toMatchObject(expected);
@@ -152,6 +154,7 @@ describe("Drone Params", () => {
152154
dryRun: true,
153155
enableBundleAnalysis: true,
154156
retryCount: 0,
157+
telemetry: false,
155158
});
156159
const params = await Drone.getServiceParams(inputs, output);
157160
expect(params).toMatchObject(expected);

0 commit comments

Comments
 (0)