Skip to content

Commit

Permalink
test(e2e): Use latest || * instead of * as version (#8585)
Browse files Browse the repository at this point in the history
Due to the [way pnpm handles
versions](pnpm/pnpm#6463), the version `*` we
use in E2E tests is actually incorrect, because it installs the _lowest_
version it can find, e.g. 0.1.0. This is usually not a problem as when
we use verdaccio, there is only a single version in the repository.
however, when running things locally/debugging stuff, and you run `pnpm
install` without verdaccio, stuff fails. This updates the versions used
in E2E tests to `latest || *`, which results in a correct resolution.
  • Loading branch information
mydea committed Jul 21, 2023
1 parent 07e2e43 commit 67c3b6a
Show file tree
Hide file tree
Showing 13 changed files with 24 additions and 23 deletions.
5 changes: 3 additions & 2 deletions packages/e2e-tests/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,8 @@ fields:
**An important thing to note:** In the context of the `buildCommand` the fake test registry is available at
`http://localhost:4873`. It hosts all of our packages as if they were to be published with the state of the current
branch. This means we can install the packages from this registry via the `.npmrc` configuration as seen above. If you
add Sentry dependencies to your test application, you should set the dependency versions set to `*`:
add Sentry dependencies to your test application, you should set the dependency versions set to `latest || *` in order
for it to work with both regular and prerelease versions:

```jsonc
// package.json
Expand All @@ -91,7 +92,7 @@ add Sentry dependencies to your test application, you should set the dependency
"test": "echo \"Hello world!\""
},
"dependencies": {
"@sentry/node": "*"
"@sentry/node": "latest || *"
}
}
```
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
},
"dependencies": {
"@next/font": "13.0.7",
"@sentry/nextjs": "*",
"@sentry/nextjs": "latest || *",
"@types/node": "18.11.17",
"@types/react": "18.0.26",
"@types/react-dom": "18.0.9",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@
"version": "0.1.0",
"private": true,
"dependencies": {
"@sentry/react": "*",
"@sentry/tracing": "*",
"@sentry/react": "latest || *",
"@sentry/tracing": "latest || *",
"@testing-library/jest-dom": "5.14.1",
"@testing-library/react": "13.0.0",
"@testing-library/user-event": "13.2.1",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
"typecheck": "tsc"
},
"dependencies": {
"@sentry/remix": "*",
"@sentry/remix": "latest || *",
"@remix-run/css-bundle": "^1.16.1",
"@remix-run/node": "^1.16.1",
"@remix-run/react": "^1.16.1",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
},
"dependencies": {
"@next/font": "13.0.7",
"@sentry/nextjs": "*",
"@sentry/nextjs": "latest || *",
"@types/node": "18.11.17",
"@types/react": "18.0.26",
"@types/react-dom": "18.0.9",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
"canaryVersions": [
{
"dependencyOverrides": {
"next": "latest"
"next": "latest || *"
}
},
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,10 @@
"test": "playwright test"
},
"dependencies": {
"@sentry/integrations": "*",
"@sentry/node": "*",
"@sentry/tracing": "*",
"@sentry/types": "*",
"@sentry/integrations": "latest || *",
"@sentry/node": "latest || *",
"@sentry/tracing": "latest || *",
"@sentry/types": "latest || *",
"express": "4.18.2",
"@types/express": "4.17.17",
"@types/node": "18.15.1",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"version": "0.1.0",
"private": true,
"dependencies": {
"@sentry/react": "*",
"@sentry/react": "latest || *",
"@testing-library/jest-dom": "5.14.1",
"@testing-library/react": "13.0.0",
"@testing-library/user-event": "13.2.1",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@
"canaryVersions": [
{
"dependencyOverrides": {
"react": "latest",
"react-dom": "latest"
"react": "latest || *",
"react-dom": "latest || *"
}
}
]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@
"version": "0.1.0",
"private": true,
"dependencies": {
"@sentry/react": "*",
"@sentry/tracing": "*",
"@sentry/react": "latest || *",
"@sentry/tracing": "latest || *",
"@testing-library/jest-dom": "5.14.1",
"@testing-library/react": "13.0.0",
"@testing-library/user-event": "13.2.1",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"version": "0.1.0",
"private": true,
"dependencies": {
"@sentry/react": "*",
"@sentry/react": "latest || *",
"@testing-library/jest-dom": "5.14.1",
"@testing-library/react": "13.0.0",
"@testing-library/user-event": "13.2.1",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,8 @@
"canaryVersions": [
{
"dependencyOverrides": {
"react": "latest",
"react-dom": "latest"
"react": "latest || *",
"react-dom": "latest || *"
}
}
]
Expand Down
6 changes: 3 additions & 3 deletions packages/e2e-tests/test-applications/sveltekit/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
"test:dev": "TEST_ENV=development playwright test"
},
"dependencies": {
"@sentry/sveltekit": "*"
"@sentry/sveltekit": "latest || *"
},
"devDependencies": {
"@playwright/test": "^1.27.1",
Expand All @@ -29,8 +29,8 @@
},
"pnpm": {
"overrides": {
"@sentry/node": "*",
"@sentry/tracing": "*"
"@sentry/node": "latest || *",
"@sentry/tracing": "latest || *"
}
},
"type": "module"
Expand Down

0 comments on commit 67c3b6a

Please sign in to comment.