Skip to content

refresh: Modernize to ESM, drop pre-installed Sentry deps - #1

Merged
coolguyzone merged 1 commit into
mainfrom
refresh/modernize
Jul 13, 2026
Merged

coolguyzone merged 1 commit into
mainfrom
refresh/modernize

Conversation

@coolguyzone

Copy link
Copy Markdown
Contributor

What

Refresh the sample app for the upcoming consolidated Sentry getting-started tutorial.

Changes

  • Migrate from CommonJS to ESM ("type": "module", import/export). Sentry's current Node SDK docs lead with ESM, so the sample should match. setupExpressErrorHandler works the same either way.
  • Drop pre-installed @sentry/node and @sentry/profiling-node from dependencies. The tutorial walks users through installing and initializing the SDK as a step; shipping it pre-installed makes that step a no-op.
  • Drop @sentry/profiling-node from the tutorial entirely. The sample never demonstrates profiling, so the package was noise.
  • Bump Express from 4.x to 5.x (current stable).
  • Fix typo: prodcuts → products.
  • Remove commented-out dead HTTP-server block in server.js.
  • Rewrite README to describe the new tutorial flow and document the endpoint surface.

The request/response surface is unchanged: same four product endpoints, same /products/debug-sentry error route, same static image serving from public/img/, same port 3001. Frontend integration unchanged.

Test plan

  • npm install clean (0 vulnerabilities)
  • npm start boots on port 3001
  • GET / returns the hello message
  • GET /products/kitten-mittens returns the expected JSON
  • GET /img/kitten-mittens.png returns 200 (static serving works)
  • GET /products/debug-sentry returns HTTP 500 (error route still throws)

Refresh the sample app for the new Sentry getting-started tutorial.

- Migrate from CommonJS to ESM (`"type": "module"`, `import`/`export`).
  Sentry's current Node SDK docs lead with ESM, so the sample should
  match. `setupExpressErrorHandler` works the same either way.
- Drop pre-installed `@sentry/node` and `@sentry/profiling-node` from
  dependencies. The tutorial walks users through installing and
  initializing the SDK as a step; shipping it pre-installed makes that
  step a no-op. Also drops `@sentry/profiling-node` from the tutorial
  itself — the sample never uses profiling, so the package is noise.
- Bump Express from 4.x to 5.x (current stable).
- Fix typo: `prodcuts` → `products`.
- Remove commented-out dead HTTP-server block in `server.js`.
- Rewrite README to describe the new tutorial flow and document
  the endpoint surface.

The request/response surface is unchanged: same four product endpoints,
same `/products/debug-sentry` error route, same static image serving
from `public/img/`, same port 3001. Frontend integration unchanged.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@coolguyzone
coolguyzone merged commit 023dd69 into main Jul 13, 2026
9 checks passed
@coolguyzone
coolguyzone deleted the refresh/modernize branch July 13, 2026 20:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant