Skip to content

Commit 974aa2f

Browse files
committed
prettier
1 parent ce967a4 commit 974aa2f

2 files changed

Lines changed: 12 additions & 3 deletions

File tree

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

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -273,7 +273,10 @@ export function createRollupDebugIdInjectionHooks(): {
273273
const chunkStartSnippet = code.slice(0, 2000);
274274
const chunkEndSnippet = code.slice(-500);
275275

276-
if (chunkStartSnippet.includes("_sentryDebugIdIdentifier") || chunkEndSnippet.includes("//# debugId=")) {
276+
if (
277+
chunkStartSnippet.includes("_sentryDebugIdIdentifier") ||
278+
chunkEndSnippet.includes("//# debugId=")
279+
) {
277280
return null; // Debug ID already present, skip injection
278281
}
279282

packages/bundler-plugin-core/test/index.test.ts

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,9 @@
11
import { Compiler } from "webpack";
2-
import { getDebugIdSnippet, sentryUnpluginFactory, createRollupDebugIdInjectionHooks } from "../src";
2+
import {
3+
getDebugIdSnippet,
4+
sentryUnpluginFactory,
5+
createRollupDebugIdInjectionHooks,
6+
} from "../src";
37

48
describe("getDebugIdSnippet", () => {
59
it("returns the debugId injection snippet for a passed debugId", () => {
@@ -84,7 +88,9 @@ describe("createRollupDebugIdInjectionHooks", () => {
8488
const codeWithCommentBeyond500B =
8589
"//# debugId=f6ccd6f4-7ea0-4854-8384-1c9f8340af81\n" + "a".repeat(600);
8690

87-
expect(hooks.renderChunk(codeWithCommentBeyond500B, { fileName: "bundle.js" })).not.toBeNull();
91+
expect(
92+
hooks.renderChunk(codeWithCommentBeyond500B, { fileName: "bundle.js" })
93+
).not.toBeNull();
8894
});
8995
});
9096
});

0 commit comments

Comments
 (0)