Repository navigation
refresh: Modernize to ESM, drop pre-installed Sentry deps - #1
Merged
Merged
Conversation
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>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
Refresh the sample app for the upcoming consolidated Sentry getting-started tutorial.
Changes
"type": "module",import/export). Sentry's current Node SDK docs lead with ESM, so the sample should match.setupExpressErrorHandlerworks the same either way.@sentry/nodeand@sentry/profiling-nodefrom dependencies. The tutorial walks users through installing and initializing the SDK as a step; shipping it pre-installed makes that step a no-op.@sentry/profiling-nodefrom the tutorial entirely. The sample never demonstrates profiling, so the package was noise.prodcuts→products.server.js.The request/response surface is unchanged: same four product endpoints, same
/products/debug-sentryerror route, same static image serving frompublic/img/, same port 3001. Frontend integration unchanged.Test plan
npm installclean (0 vulnerabilities)npm startboots on port 3001GET /returns the hello messageGET /products/kitten-mittensreturns the expected JSONGET /img/kitten-mittens.pngreturns 200 (static serving works)GET /products/debug-sentryreturns HTTP 500 (error route still throws)