Skip to content

Commit 2229999

Browse files
committed
test: Isolate integration test package installs
1 parent d58faea commit 2229999

17 files changed

Lines changed: 145 additions & 230 deletions

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,3 +12,4 @@ packages/**/yarn.lock
1212

1313
.DS_Store
1414
packages/bundler-plugin-core/src/version.ts
15+
packages/integration-tests-next/fixtures/**/pnpm-lock.yaml

package.json

Lines changed: 3 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -18,13 +18,9 @@
1818
"packages/tsconfigs",
1919
"packages/vite-plugin",
2020
"packages/webpack-plugin",
21-
"packages/integration-tests-next",
22-
"packages/integration-tests-next/fixtures/rolldown",
23-
"packages/integration-tests-next/fixtures/rollup3",
24-
"packages/integration-tests-next/fixtures/rollup4"
21+
"packages/integration-tests-next"
2522
],
2623
"scripts": {
27-
"postinstall": "patch-package",
2824
"build": "nx run-many --target=build --all",
2925
"build:watch": "nx run-many --target=build:watch --all",
3026
"build:graph": "nx graph",
@@ -36,7 +32,7 @@
3632
"test:all": "nx run-many --target=test --all",
3733
"test:unit": "nx run-many --target=test --all --exclude=@sentry-internal/integration-tests,@sentry-internal/integration-tests-next,@sentry-internal/bundler-plugin-e2e-tests",
3834
"test:integration": "nx run @sentry-internal/integration-tests:test",
39-
"test:integration-next": "nx run @sentry-internal/integration-tests-next:test",
35+
"test:integration-next": "yarn build:npm && nx run @sentry-internal/integration-tests-next:test",
4036
"test:e2e": "nx run @sentry-internal/bundler-plugin-e2e-tests:test",
4137
"lint": "nx run-many --target=lint --all",
4238
"check:formatting": "oxfmt --check .",
@@ -47,8 +43,7 @@
4743
"npm-run-all": "^4.1.5",
4844
"nx": "22.5.2",
4945
"oxfmt": "^0.33.0",
50-
"ts-node": "^10.9.2",
51-
"patch-package": "^8.0.1"
46+
"ts-node": "^10.9.2"
5247
},
5348
"volta": {
5449
"node": "22.22.0",

patches/@sentry+cli+2.58.5.patch renamed to packages/integration-tests-next/fixtures/patches/@sentry__cli.patch

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
1-
diff --git a/node_modules/@sentry/cli/js/helper.js b/node_modules/@sentry/cli/js/helper.js
2-
index 56f95c9..b97e41b 100644
3-
--- a/node_modules/@sentry/cli/js/helper.js
4-
+++ b/node_modules/@sentry/cli/js/helper.js
1+
diff --git a/js/helper.js b/js/helper.js
2+
index 56f95c9784d32a48e98b8341bfa336f0ed61a6e7..b97e41b4dcf96b9dcd9e171b91b575898b6cfbc3 100644
3+
--- a/js/helper.js
4+
+++ b/js/helper.js
55
@@ -295,6 +295,13 @@ function execute(args_1, live_1, silent_1, configFile_1) {
66
if (config.vcsRemote) {
77
env.SENTRY_VCS_REMOTE = config.vcsRemote;

packages/integration-tests-next/fixtures/rolldown/build-info.test.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ test(import.meta.url, ({ runBundler, readOutputFiles }) => {
66
expect(readOutputFiles()).toMatchInlineSnapshot(`
77
{
88
"basic.js": "//#region src/basic.js
9-
!function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{};e.SENTRY_RELEASE={id:"build-information-injection-test"};e.SENTRY_BUILD_INFO={"deps":["react","rolldown"],"depsVersions":{"react":19},"nodeVersion":"NODE_VERSION"};var n=(new e.Error).stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="b699d9c1-b033-4536-aa25-233c92609b54",e._sentryDebugIdIdentifier="sentry-dbid-b699d9c1-b033-4536-aa25-233c92609b54");}catch(e){}}();console.log("hello world");
9+
!function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{};e.SENTRY_RELEASE={id:"build-information-injection-test"};e.SENTRY_BUILD_INFO={"deps":["@sentry/rollup-plugin","react","rolldown"],"depsVersions":{"react":19},"nodeVersion":"NODE_VERSION"};var n=(new e.Error).stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="b699d9c1-b033-4536-aa25-233c92609b54",e._sentryDebugIdIdentifier="sentry-dbid-b699d9c1-b033-4536-aa25-233c92609b54");}catch(e){}}();console.log("hello world");
1010
1111
//#endregion",
1212
}

packages/integration-tests-next/fixtures/rolldown/component-annotation-disabled.test.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ test(import.meta.url, ({ runBundler, readOutputFiles }) => {
55
runBundler();
66
expect(readOutputFiles()).toMatchInlineSnapshot(`
77
{
8-
"app.js": "!function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{};e.SENTRY_RELEASE={id:"CURRENT_SHA"};var n=(new e.Error).stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="b0a43d00-208c-4b0e-b024-c0951a1c11f8",e._sentryDebugIdIdentifier="sentry-dbid-b0a43d00-208c-4b0e-b024-c0951a1c11f8");}catch(e){}}();import { jsx, jsxs } from "../../../../../node_modules/react/jsx-runtime.js";
8+
"app.js": "!function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{};e.SENTRY_RELEASE={id:"CURRENT_SHA"};var n=(new e.Error).stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="85f51673-9b26-4de9-b6ba-12058e53f08b",e._sentryDebugIdIdentifier="sentry-dbid-85f51673-9b26-4de9-b6ba-12058e53f08b");}catch(e){}}();import { jsx, jsxs } from "../node_modules/.pnpm/react@19.2.4/node_modules/react/jsx-runtime.js";
99
1010
//#region src/component-a.jsx
1111
function ComponentA() {

packages/integration-tests-next/fixtures/rolldown/component-annotation-next.test.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ test(import.meta.url, ({ runBundler, readOutputFiles }) => {
55
runBundler();
66
expect(readOutputFiles()).toMatchInlineSnapshot(`
77
{
8-
"app.js": "!function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{};e.SENTRY_RELEASE={id:"CURRENT_SHA"};var n=(new e.Error).stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="4bdf6d53-8b4d-4766-b048-143c5e6d2cbd",e._sentryDebugIdIdentifier="sentry-dbid-4bdf6d53-8b4d-4766-b048-143c5e6d2cbd");}catch(e){}}();import { jsx, jsxs } from "../../../../../node_modules/react/jsx-runtime.js";
8+
"app.js": "!function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{};e.SENTRY_RELEASE={id:"CURRENT_SHA"};var n=(new e.Error).stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="08d8ea54-706b-4dfc-9e1f-19af2d0fc86e",e._sentryDebugIdIdentifier="sentry-dbid-08d8ea54-706b-4dfc-9e1f-19af2d0fc86e");}catch(e){}}();import { jsx, jsxs } from "../node_modules/.pnpm/react@19.2.4/node_modules/react/jsx-runtime.js";
99
1010
//#region src/component-a.jsx
1111
function ComponentA() {

packages/integration-tests-next/fixtures/rolldown/component-annotation.test.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ test(import.meta.url, ({ runBundler, readOutputFiles }) => {
55
runBundler();
66
expect(readOutputFiles()).toMatchInlineSnapshot(`
77
{
8-
"app.js": "!function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{};e.SENTRY_RELEASE={id:"CURRENT_SHA"};var n=(new e.Error).stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="0880f8a4-f072-4b80-b577-4bb7d5be4841",e._sentryDebugIdIdentifier="sentry-dbid-0880f8a4-f072-4b80-b577-4bb7d5be4841");}catch(e){}}();import { jsx, jsxs } from "../../../../../node_modules/react/jsx-runtime.js";
8+
"app.js": "!function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{};e.SENTRY_RELEASE={id:"CURRENT_SHA"};var n=(new e.Error).stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="0ad46712-3fec-46f3-8539-60a50dfc7fc6",e._sentryDebugIdIdentifier="sentry-dbid-0ad46712-3fec-46f3-8539-60a50dfc7fc6");}catch(e){}}();import { jsx, jsxs } from "../node_modules/.pnpm/react@19.2.4/node_modules/react/jsx-runtime.js";
99
1010
//#region src/component-a.jsx
1111
function ComponentA() {

packages/integration-tests-next/fixtures/rolldown/package.json

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,18 @@
44
"private": true,
55
"type": "module",
66
"dependencies": {
7+
"@sentry/rollup-plugin": "5.1.1",
78
"react": "^19.2.4",
89
"rolldown": "^1.0.0-rc.6"
10+
},
11+
"pnpm": {
12+
"overrides": {
13+
"@sentry/bundler-plugin-core": "file:../../../bundler-plugin-core/sentry-bundler-plugin-core-5.1.1.tgz",
14+
"@sentry/rollup-plugin": "file:../../../rollup-plugin/sentry-rollup-plugin-5.1.1.tgz",
15+
"@sentry/babel-plugin-component-annotate": "file:../../../babel-plugin-component-annotate/sentry-babel-plugin-component-annotate-5.1.1.tgz"
16+
},
17+
"patchedDependencies": {
18+
"@sentry/cli": "../patches/@sentry__cli.patch"
19+
}
920
}
1021
}

packages/integration-tests-next/fixtures/rollup3/build-info.test.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ test(import.meta.url, ({ runBundler, readOutputFiles }) => {
66
expect(readOutputFiles()).toMatchInlineSnapshot(`
77
{
88
"basic.js": "// eslint-disable-next-line no-console
9-
!function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{};e.SENTRY_RELEASE={id:"build-information-injection-test"};e.SENTRY_BUILD_INFO={"deps":["@rollup/plugin-babel","@rollup/plugin-node-resolve","react","rollup"],"depsVersions":{"react":19,"rollup":3},"nodeVersion":"NODE_VERSION"};var n=(new e.Error).stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="252e0338-8927-4f52-bd57-188131defd0f",e._sentryDebugIdIdentifier="sentry-dbid-252e0338-8927-4f52-bd57-188131defd0f");}catch(e){}}();console.log("hello world");
9+
!function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{};e.SENTRY_RELEASE={id:"build-information-injection-test"};e.SENTRY_BUILD_INFO={"deps":["@rollup/plugin-babel","@rollup/plugin-node-resolve","@sentry/rollup-plugin","react","rollup"],"depsVersions":{"react":19,"rollup":3},"nodeVersion":"NODE_VERSION"};var n=(new e.Error).stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="252e0338-8927-4f52-bd57-188131defd0f",e._sentryDebugIdIdentifier="sentry-dbid-252e0338-8927-4f52-bd57-188131defd0f");}catch(e){}}();console.log("hello world");
1010
",
1111
}
1212
`);

packages/integration-tests-next/fixtures/rollup3/package.json

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,17 @@
77
"react": "^19.2.4",
88
"rollup": "^3.30.0",
99
"@rollup/plugin-babel": "^6.0.4",
10-
"@rollup/plugin-node-resolve": "^15.2.3"
10+
"@rollup/plugin-node-resolve": "^15.2.3",
11+
"@sentry/rollup-plugin": "5.1.1"
12+
},
13+
"pnpm": {
14+
"overrides": {
15+
"@sentry/bundler-plugin-core": "file:../../../bundler-plugin-core/sentry-bundler-plugin-core-5.1.1.tgz",
16+
"@sentry/rollup-plugin": "file:../../../rollup-plugin/sentry-rollup-plugin-5.1.1.tgz",
17+
"@sentry/babel-plugin-component-annotate": "file:../../../babel-plugin-component-annotate/sentry-babel-plugin-component-annotate-5.1.1.tgz"
18+
},
19+
"patchedDependencies": {
20+
"@sentry/cli": "../patches/@sentry__cli.patch"
21+
}
1122
}
1223
}

0 commit comments

Comments
 (0)