Skip to content

Commit d5b9c61

Browse files
authored
Merge branch 'main' into timfish/fix/double-debug-id-injection
2 parents f772712 + 2d796d7 commit d5b9c61

File tree

3 files changed

+6
-388
lines changed

3 files changed

+6
-388
lines changed

packages/integration-tests/package.json

-2
Original file line numberDiff line numberDiff line change
@@ -39,10 +39,8 @@
3939
"react": "^18.2.0",
4040
"react-dom": "^18.2.0",
4141
"rollup": "3.2.0",
42-
"rollup4": "npm:rollup@^4",
4342
"ts-node": "^10.9.1",
4443
"vite": "3.0.0",
45-
"vite6": "npm:vite@^6",
4644
"webpack4": "npm:webpack@^4",
4745
"webpack5": "npm:[email protected]"
4846
},

packages/integration-tests/utils/create-cjs-bundles.ts

+6-56
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
import * as vite3 from "vite";
1+
import * as vite from "vite";
22
import * as path from "path";
3-
import * as rollup3 from "rollup";
3+
import * as rollup from "rollup";
44
import { default as webpack4 } from "webpack4";
55
import { webpack as webpack5 } from "webpack5";
66
import * as esbuild from "esbuild";
@@ -10,17 +10,9 @@ import { sentryWebpackPlugin } from "@sentry/webpack-plugin";
1010
import { sentryEsbuildPlugin } from "@sentry/esbuild-plugin";
1111
import { sentryRollupPlugin } from "@sentry/rollup-plugin";
1212

13-
const [NODE_MAJOR_VERSION] = process.version.split(".").map(Number) as [number];
13+
const [NODE_MAJOR_VERSION] = process.version.replace("v", "").split(".").map(Number) as [number];
1414

15-
type Bundlers =
16-
| "webpack4"
17-
| "webpack5"
18-
| "esbuild"
19-
| "rollup"
20-
| "rollup4"
21-
| "vite"
22-
| "vite6"
23-
| string;
15+
type Bundlers = "webpack4" | "webpack5" | "esbuild" | "rollup" | "vite" | string;
2416

2517
export function createCjsBundles(
2618
entrypoints: { [name: string]: string },
@@ -29,29 +21,7 @@ export function createCjsBundles(
2921
plugins: Bundlers[] = []
3022
): void {
3123
if (plugins.length === 0 || plugins.includes("vite")) {
32-
void vite3.build({
33-
clearScreen: false,
34-
build: {
35-
sourcemap: true,
36-
outDir: path.join(outFolder, "vite"),
37-
rollupOptions: {
38-
input: entrypoints,
39-
output: {
40-
format: "cjs",
41-
entryFileNames: "[name].js",
42-
},
43-
},
44-
},
45-
plugins: [sentryVitePlugin(sentryUnpluginOptions)],
46-
});
47-
}
48-
49-
if (NODE_MAJOR_VERSION >= 18 && (plugins.length === 0 || plugins.includes("vite6"))) {
50-
// We can't import this at the top of the file because they are not
51-
// compatible with Node v14
52-
// eslint-disable-next-line @typescript-eslint/no-var-requires
53-
const vite6 = require("vite6") as typeof vite3;
54-
void vite6.build({
24+
void vite.build({
5525
clearScreen: false,
5626
build: {
5727
sourcemap: true,
@@ -69,27 +39,7 @@ export function createCjsBundles(
6939
}
7040

7141
if (plugins.length === 0 || plugins.includes("rollup")) {
72-
void rollup3
73-
.rollup({
74-
input: entrypoints,
75-
plugins: [sentryRollupPlugin(sentryUnpluginOptions)],
76-
})
77-
.then((bundle) =>
78-
bundle.write({
79-
sourcemap: true,
80-
dir: path.join(outFolder, "rollup"),
81-
format: "cjs",
82-
exports: "named",
83-
})
84-
);
85-
}
86-
87-
if (NODE_MAJOR_VERSION >= 18 && (plugins.length === 0 || plugins.includes("rollup4"))) {
88-
// We can't import this at the top of the file because they are not
89-
// compatible with Node v14
90-
// eslint-disable-next-line @typescript-eslint/no-var-requires
91-
const rollup4 = require("rollup4") as typeof rollup3;
92-
void rollup4
42+
void rollup
9343
.rollup({
9444
input: entrypoints,
9545
plugins: [sentryRollupPlugin(sentryUnpluginOptions)],

0 commit comments

Comments
 (0)