Skip to content

Commit 54b06e1

Browse files
committed
formatting
1 parent d5f04ea commit 54b06e1

File tree

3 files changed

+20
-14
lines changed

3 files changed

+20
-14
lines changed

packages/bundler-plugin-core/src/options-mapping.ts

Lines changed: 15 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -44,14 +44,16 @@ export type NormalizedOptions = {
4444
| false
4545
| undefined;
4646
dist?: string;
47-
deploy?: {
48-
env: string;
49-
started?: number | string;
50-
finished?: number | string;
51-
time?: number;
52-
name?: string;
53-
url?: string;
54-
} | false;
47+
deploy?:
48+
| {
49+
env: string;
50+
started?: number | string;
51+
finished?: number | string;
52+
time?: number;
53+
name?: string;
54+
url?: string;
55+
}
56+
| false;
5557
uploadLegacySourcemaps?: string | IncludeEntry | Array<string | IncludeEntry>;
5658
};
5759
bundleSizeOptimizations:
@@ -195,7 +197,11 @@ export function validateOptions(options: NormalizedOptions, logger: Logger): boo
195197
}
196198
}
197199

198-
if (options.release?.deploy && typeof options.release.deploy === "object" && !options.release.deploy.env) {
200+
if (
201+
options.release?.deploy &&
202+
typeof options.release.deploy === "object" &&
203+
!options.release.deploy.env
204+
) {
199205
logger.error(
200206
"The `deploy` option was specified but is missing the required `env` property.",
201207
"Please set the `env` property."

packages/bundler-plugin-core/src/types.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -239,7 +239,7 @@ export interface Options {
239239

240240
/**
241241
* Configuration for adding deployment information to the release in Sentry.
242-
*
242+
*
243243
* Set to `false` to disable automatic deployment detection and creation.
244244
*/
245245
deploy?: DeployOptions | false;

packages/bundler-plugin-core/test/option-mappings.test.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -135,7 +135,7 @@ describe("normalizeUserOptions()", () => {
135135
};
136136

137137
const normalizedOptions = normalizeUserOptions(userOptions);
138-
138+
139139
expect(normalizedOptions.release.deploy).toEqual({
140140
env: "vercel-production",
141141
url: "https://my-app.vercel.app",
@@ -155,7 +155,7 @@ describe("normalizeUserOptions()", () => {
155155
};
156156

157157
const normalizedOptions = normalizeUserOptions(userOptions);
158-
158+
159159
expect(normalizedOptions.release.deploy).toBe(false);
160160
});
161161

@@ -173,7 +173,7 @@ describe("normalizeUserOptions()", () => {
173173
};
174174

175175
const normalizedOptions = normalizeUserOptions(userOptions);
176-
176+
177177
expect(normalizedOptions.release.deploy).toEqual(manualDeployConfig);
178178
});
179179

@@ -186,7 +186,7 @@ describe("normalizeUserOptions()", () => {
186186
};
187187

188188
const normalizedOptions = normalizeUserOptions(userOptions);
189-
189+
190190
expect(normalizedOptions.release.deploy).toBeUndefined();
191191
});
192192
});

0 commit comments

Comments
 (0)