Skip to content

Commit

Permalink
chore(deps): bump @sentry/node to 8.10.0 (#738)
Browse files Browse the repository at this point in the history
* wip, waiting for issue to be resolved

* chore: apply prisma patch to import-in-the-middle

* chore: bump sentry to latest

* chore: flush sentry in tests

* chore: remove sentry group from dependabot

* chore: 0 timeout

* chore: copy patches directory in dockerfile
  • Loading branch information
larwaa authored Jun 20, 2024
1 parent cc68ff9 commit 7e4e3eb
Show file tree
Hide file tree
Showing 19 changed files with 1,177 additions and 279 deletions.
2 changes: 1 addition & 1 deletion .env.development
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ SERVER_URL=http://localhost:4000
REDIRECT_ORIGINS=http://localhost:3000,http://localhost:4000
RATE_LIMIT_MAX=1000
REDIS_CONNECTION_STRING=redis://:@localhost:6380
SENTRY_DNS=https://[email protected]/6553834
SENTRY_DSN=https://[email protected]/6553834
SENTRY_TRACES_SAMPLE_RATE=1.0
SESSION_COOKIE_DOMAIN=localhost
SESSION_COOKIE_HTTP_ONLY=true
Expand Down
2 changes: 1 addition & 1 deletion .env.test
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ REDIRECT_ORIGINS=https://example.com
POSTMARK_API_TOKEN=verysecret
RATE_LIMIT_MAX=10000000
REDIS_CONNECTION_STRING=redis://:@localhost:6380
SENTRY_DNS=https://[email protected]/6553834
SENTRY_DSN=https://[email protected]/6553834
SENTRY_TRACES_SAMPLE_RATE=1.0
SESSION_COOKIE_DOMAIN=localhost
SESSION_COOKIE_HTTP_ONLY=true
Expand Down
2 changes: 1 addition & 1 deletion .env.worker.development
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ SERVER_URL=http://localhost:4000
REDIRECT_ORIGINS=http://localhost:3000,http://localhost:4000
RATE_LIMIT_MAX=1000
REDIS_CONNECTION_STRING=redis://:@localhost:6380
SENTRY_DNS=https://[email protected]/6553834
SENTRY_DSN=https://[email protected]/6553834
SENTRY_TRACES_SAMPLE_RATE=1.0
SESSION_COOKIE_DOMAIN=localhost
SESSION_COOKIE_HTTP_ONLY=true
Expand Down
5 changes: 1 addition & 4 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,10 +21,7 @@ updates:
open-pull-requests-limit: 10

groups:
# All sentry packages should be updated together
sentry:
patterns:
- "@sentry/*"
# All prisma packages should be updated together
prisma:
patterns:
- "@prisma/client*"
Expand Down
2 changes: 2 additions & 0 deletions Dockerfile.prod
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ FROM base AS prod-deps
ENV NODE_ENV production

COPY package.json pnpm-lock.yaml ./
COPY patches/ ./patches
RUN --mount=type=cache,id=pnpm,target=/pnpm/store pnpm install --prod --frozen-lockfile

COPY prisma/ ./prisma
Expand All @@ -26,6 +27,7 @@ RUN pnpm run generate:prisma
FROM base AS build

COPY package.json pnpm-lock.yaml ./
COPY patches/ ./patches
RUN --mount=type=cache,id=pnpm,target=/pnpm/store pnpm install --frozen-lockfile

COPY .swcrc codegen.config.ts biome.json tsconfig.json ./
Expand Down
1 change: 1 addition & 0 deletions infrastructure/modules/server/server_app.tf
Original file line number Diff line number Diff line change
Expand Up @@ -123,6 +123,7 @@ resource "azurerm_container_app" "server" {
memory = "0.5Gi"
name = "server"
image = var.image_tag
command = ["pnpm", "run", "start:production"]

startup_probe {
failure_count_threshold = 10
Expand Down
23 changes: 20 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,13 @@
"type": "module",
"packageManager": "[email protected]",
"files": ["dist", "certs", "scripts"],
"engines": {
"node": ">=20",
"pnpm": ">=9"
},
"scripts": {
"setup": "run-p generate",
"start:production": "node --import ./dist/instrument.js ./dist/server.js",
"build:production": "run-s generate:gql swc",
"build": "pnpm run swc",
"studio": "prisma studio",
Expand Down Expand Up @@ -95,10 +100,15 @@
"@fastify/redis": "^6.1.1",
"@fastify/session": "^10.9.0",
"@fastify/under-pressure": "^8.5.0",
"@immobiliarelabs/fastify-sentry": "^8.0.1",
"@opentelemetry/exporter-trace-otlp-http": "^0.52.0",
"@opentelemetry/instrumentation": "^0.52.0",
"@opentelemetry/resources": "^1.25.0",
"@opentelemetry/sdk-trace-base": "^1.25.0",
"@opentelemetry/sdk-trace-node": "^1.25.0",
"@opentelemetry/semantic-conventions": "^1.25.0",
"@prisma/client": "^5.15.1",
"@sentry/node": "^7.114.0",
"@sentry/tracing": "7.114.0",
"@prisma/instrumentation": "^5.15.0",
"@sentry/node": "^8.10.0",
"@vippsmobilepay/sdk": "^1.3.1",
"bullmq": "^5.8.2",
"connect-redis": "^7.1.1",
Expand All @@ -108,6 +118,7 @@
"graphql": "^16.8.2",
"graphql-scalars": "^1.23.0",
"graphql-tag": "^2.12.6",
"import-in-the-middle": "1.8.1",
"ioredis": "^5.4.1",
"lodash-es": "^4.17.21",
"luxon": "^3.4.4",
Expand All @@ -123,6 +134,12 @@
"os": ["current", "linux"],
"cpu": ["current", "x64"],
"libc": ["current", "glibc"]
},
"overrides": {
"import-in-the-middle": "1.8.1"
},
"patchedDependencies": {
"[email protected]": "patches/[email protected]"
}
}
}
14 changes: 14 additions & 0 deletions patches/[email protected]
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
diff --git a/lib/get-exports.js b/lib/get-exports.js
index 9a78e8c6effb730d32ba768b4df2e80568356b37..de88a37b5e315bd591361b4e88fc7045a08bda64 100644
--- a/lib/get-exports.js
+++ b/lib/get-exports.js
@@ -43,6 +43,9 @@ async function getCjsExports (url, context, parentLoad, source) {
full.add(each)
}
} else {
+ if (re === '.') {
+ re = './'
+ }
// Resolve the re-exported module relative to the current module.
const newUrl = pathToFileURL(require.resolve(re, { paths: [dirname(fileURLToPath(url))] })).href
for (const each of await getExports(newUrl, context, parentLoad)) {
Loading

0 comments on commit 7e4e3eb

Please sign in to comment.