Skip to content

test(e2e): use 127.0.0.1 instead of localhost for E2E .npmrc #9330

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Oct 23, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions packages/e2e-tests/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -49,8 +49,8 @@ mkdir test-applications/my-new-test-application # Name of the new folder doesn't

# Create an npm configuration file that uses the fake test registry
cat > test-applications/my-new-test-application/.npmrc << EOF
@sentry:registry=http://localhost:4873
@sentry-internal:registry=http://localhost:4873
@sentry:registry=http://127.0.0.1:4873
@sentry-internal:registry=http://127.0.0.1:4873
EOF
```

Expand All @@ -60,7 +60,7 @@ Add the new test app to `test-application` matrix in `.github/workflows/build.ym
want to run a canary test, add it to the `canary.yml` workflow.

**An important thing to note:** In the context of the build/test commands 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
`http://127.0.0.1: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 `latest || *` in order
for it to work with both regular and prerelease versions:
Expand Down
4 changes: 2 additions & 2 deletions packages/e2e-tests/test-applications/create-next-app/.npmrc
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
@sentry:registry=http://localhost:4873
@sentry-internal:registry=http://localhost:4873
@sentry:registry=http://127.0.0.1:4873
@sentry-internal:registry=http://127.0.0.1:4873
4 changes: 2 additions & 2 deletions packages/e2e-tests/test-applications/create-react-app/.npmrc
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
@sentry:registry=http://localhost:4873
@sentry-internal:registry=http://localhost:4873
@sentry:registry=http://127.0.0.1:4873
@sentry-internal:registry=http://127.0.0.1:4873
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
@sentry:registry=http://localhost:4873
@sentry-internal:registry=http://localhost:4873
@sentry:registry=http://127.0.0.1:4873
@sentry-internal:registry=http://127.0.0.1:4873
4 changes: 2 additions & 2 deletions packages/e2e-tests/test-applications/create-remix-app/.npmrc
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
@sentry:registry=http://localhost:4873
@sentry-internal:registry=http://localhost:4873
@sentry:registry=http://127.0.0.1:4873
@sentry-internal:registry=http://127.0.0.1:4873
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
@sentry:registry=http://localhost:4873
@sentry-internal:registry=http://localhost:4873
@sentry:registry=http://127.0.0.1:4873
@sentry-internal:registry=http://127.0.0.1:4873
4 changes: 2 additions & 2 deletions packages/e2e-tests/test-applications/generic-ts3.8/.npmrc
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
@sentry:registry=http://localhost:4873
@sentry-internal:registry=http://localhost:4873
@sentry:registry=http://127.0.0.1:4873
@sentry-internal:registry=http://127.0.0.1:4873
4 changes: 2 additions & 2 deletions packages/e2e-tests/test-applications/nextjs-app-dir/.npmrc
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
@sentry:registry=http://localhost:4873
@sentry-internal:registry=http://localhost:4873
@sentry:registry=http://127.0.0.1:4873
@sentry-internal:registry=http://127.0.0.1:4873
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
@sentry:registry=http://localhost:4873
@sentry-internal:registry=http://localhost:4873
@sentry:registry=http://127.0.0.1:4873
@sentry-internal:registry=http://127.0.0.1:4873
4 changes: 2 additions & 2 deletions packages/e2e-tests/test-applications/node-express-app/.npmrc
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
@sentry:registry=http://localhost:4873
@sentry-internal:registry=http://localhost:4873
@sentry:registry=http://127.0.0.1:4873
@sentry-internal:registry=http://127.0.0.1:4873
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
@sentry:registry=http://localhost:4873
@sentry-internal:registry=http://localhost:4873
@sentry:registry=http://127.0.0.1:4873
@sentry-internal:registry=http://127.0.0.1:4873
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
@sentry:registry=http://localhost:4873
@sentry-internal:registry=http://localhost:4873
@sentry:registry=http://127.0.0.1:4873
@sentry-internal:registry=http://127.0.0.1:4873
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
@sentry:registry=http://localhost:4873
@sentry-internal:registry=http://localhost:4873
@sentry:registry=http://127.0.0.1:4873
@sentry-internal:registry=http://127.0.0.1:4873
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
@sentry:registry=http://localhost:4873
@sentry-internal:registry=http://localhost:4873
@sentry:registry=http://127.0.0.1:4873
@sentry-internal:registry=http://127.0.0.1:4873
4 changes: 2 additions & 2 deletions packages/e2e-tests/test-applications/sveltekit/.npmrc
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
@sentry:registry=http://localhost:4873
@sentry-internal:registry=http://localhost:4873
@sentry:registry=http://127.0.0.1:4873
@sentry-internal:registry=http://127.0.0.1:4873
6 changes: 3 additions & 3 deletions packages/e2e-tests/test-registry.npmrc
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
@sentry:registry=http://localhost:4873
@sentry-internal:registry=http://localhost:4873
//localhost:4873/:_authToken=some-token
@sentry:registry=http://127.0.0.1:4873
@sentry-internal:registry=http://127.0.0.1:4873
//127.0.0.1:4873/:_authToken=some-token

# Do not notify about npm updates
update-notifier=false