Skip to content

Commit f57805a

Browse files
authored
test: Isolate integration test package installs (#902)
* test: Isolate integration test package installs * Remove magic pkgJson length
1 parent d58faea commit f57805a

File tree

23 files changed

+148
-236
lines changed

23 files changed

+148
-236
lines changed

.github/workflows/checks.yml

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,9 @@ jobs:
3737
uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4
3838
with:
3939
name: dist-artifacts-${{ github.run_id }}
40-
path: packages/*/dist
40+
path: |
41+
packages/*/dist
42+
packages/*/*.tgz
4143
retention-days: 1
4244

4345
type-check:
@@ -169,6 +171,9 @@ jobs:
169171
- uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4
170172
with:
171173
node-version: ${{ matrix.node-version }}
174+
- uses: pnpm/action-setup@fc06bc1257f339d1d5d8b3a19a8cae5388b55320
175+
with:
176+
version: 10
172177
- name: Use dependency cache
173178
uses: actions/cache@0057852bfaa89a56745cba8c7296529d2fc39830 # v4
174179
id: dependency-cache

.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: 2 additions & 7 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",
@@ -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",

packages/babel-plugin-component-annotate/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@
3232
"module": "dist/esm/index.mjs",
3333
"types": "dist/types/index.d.ts",
3434
"scripts": {
35-
"build": "premove ./out && run-p build:rollup build:types",
35+
"build": "premove ./out && run-p build:rollup build:types && run-s build:npm",
3636
"build:watch": "run-p build:rollup:watch build:types:watch",
3737
"build:rollup": "rolldown --config rollup.config.mjs",
3838
"build:rollup:watch": "rolldown --config rollup.config.mjs --watch --no-watch.clearScreen",

packages/bundler-plugin-core/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@
3434
"types": "dist/types/index.d.ts",
3535
"scripts": {
3636
"prebuild": "node -p \"'export const LIB_VERSION = ' + JSON.stringify(require('./package.json').version) + ';'\" > src/version.ts",
37-
"build": "premove ./out && run-p build:rollup build:types",
37+
"build": "premove ./out && run-p build:rollup build:types && run-s build:npm",
3838
"build:watch": "run-p build:rollup:watch build:types:watch",
3939
"build:rollup": "rolldown --config rollup.config.mjs",
4040
"build:rollup:watch": "rolldown --config rollup.config.mjs --watch --no-watch.clearScreen",

packages/esbuild-plugin/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@
2929
"module": "dist/esm/index.mjs",
3030
"types": "dist/types/index.d.ts",
3131
"scripts": {
32-
"build": "premove ./out && run-p build:rollup build:types",
32+
"build": "premove ./out && run-p build:rollup build:types && run-s build:npm",
3333
"build:watch": "run-p build:rollup:watch build:types:watch",
3434
"build:rollup": "rolldown --config rollup.config.mjs",
3535
"build:rollup:watch": "rolldown --config rollup.config.mjs --watch --no-watch.clearScreen",

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() {

0 commit comments

Comments
 (0)