Title: Module / Package Refactor · Issue #323 · getsentry/sentry-javascript · GitHub
Open Graph Title: Module / Package Refactor · Issue #323 · getsentry/sentry-javascript
X Title: Module / Package Refactor · Issue #323 · getsentry/sentry-javascript
Description: Goals Support browserify, webpack, bower, and Sentry's CDN (which means native bundled distribution) Break raven.js into a more modular system, where the ideal installation doesnt use our CDN, but rather uses require() technologies Combi...
Open Graph Description: Goals Support browserify, webpack, bower, and Sentry's CDN (which means native bundled distribution) Break raven.js into a more modular system, where the ideal installation doesnt use our CDN, but ...
X Description: Goals Support browserify, webpack, bower, and Sentry's CDN (which means native bundled distribution) Break raven.js into a more modular system, where the ideal installation doesnt use our CDN, ...
Opengraph URL: https://github.com/getsentry/sentry-javascript/issues/323
X: @github
Domain: github.com
IPv4 address: 140.82.114.3
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Module / Package Refactor","articleBody":"# Goals\n- Support browserify, webpack, bower, and Sentry's CDN (which means native bundled distribution)\n- Break raven.js into a more modular system, where the ideal installation doesnt use our CDN, but rather uses require() technologies\n- Combine raven-node and raven-js codebases and npm package\n - package.json can specify a 'browser' attribute to override this for npm\n- Get the codebase into a position for future code reuse between the two projects\n# Proposal\n## API\n\nThe primary target here is module-based usage, so the following should work:\n\n```\nvar Raven = require('raven');\n\nRaven.config().install()\n```\n\nBoth the node.js client and the javascript client should expose the same APIs. That is, they should expose the spec from Sentry with identical arguments (to the best of their ability).\n## Code Exposure\n\nInternally (via the module system) we want to expose a great deal of Raven. If we can, all of it. That said, 'raven' itself would only export the public namespaces, and you'd have to include other module(s) to get access to those.\n## Plugins\n\nModeled after webpack, instead of straight up patching, each plugin would have a load/unload hook responsible for it's behavior:\n\n```\nvar ravenjQ = require('raven/plugins/jquery');\n\nRaven.config({\n plugins: [new ravenjQ()]\n});\n```\n\nAlternatively we could namespace builtin plugins:\n\n```\nRaven.config({\n plugins: [new Raven.plugins.jQuery()]\n});\n```\n\nSee #282\n## Bundling\n\nWe need to determine how best to bundle things with the umd wrapper. There are things like grunt-umd to aid with this.\n\nSee also: https://github.com/umdjs/umd/blob/ce6c20e318e58cd301ee929135cf651b02392c08/returnExports.js\n\nThis will still need a build task, but the primary resource for this is the Sentry CDN, so it's possible we can move the dist/ out of the codebase.\n\nThe raven.js bundle would expose the identical namespace as 'raven'. That is, only the public API and none of the others.\n# Notes\n- raven-node isn't very used\n- code reuse is the lowest priority, the goal is simply a better experience for end-users\n","author":{"url":"https://github.com/dcramer","@type":"Person","name":"dcramer"},"datePublished":"2015-03-02T03:19:02Z","url":"https://github.com/getsentry/sentry-javascript/issues/323"}
| react-profiling | 0 |
| react-import-map | react,react-dom,react-dom/client,react-dom/profiling,react-is,react/compiler-runtime,react/jsx-dev-runtime,react/jsx-runtime,scheduler@b8488ee2c322 |
| route-pattern | /_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format) |
| route-controller | voltron_issues_fragments |
| route-action | issue_layout |
| fetch-nonce | v2:d75513fd-0724-5934-d121-60558cc21936 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | 842C:1EE375:79C47A:AAE1DB:6B04237B |
| html-safe-nonce | eb911daa7b07f8b62633cdc5394ad0eef475a6b87664bc81f1700fed682ffd9e |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiI4NDJDOjFFRTM3NTo3OUM0N0E6QUFFMURCOjZCMDQyMzdCIiwidmlzaXRvcl9pZCI6IjM3NjM1MjQ3MTc2NTE0MzY0MTEiLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ== |
| visitor-hmac | d065b42596a54ba704aa82a9fd646c8d375b93e57a7d2bafadce8292a1b0081b |
| hovercard-subject-tag | issue:59434233 |
| github-keyboard-shortcuts | repository,issues,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/getsentry/sentry-javascript/323/issue_layout |
| twitter:image | https://opengraph.githubassets.com/525734130b5792f0a3a1f4af54aa6b544080d4190f125a5114620f1fa7393f2a/getsentry/sentry-javascript/issues/323 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/525734130b5792f0a3a1f4af54aa6b544080d4190f125a5114620f1fa7393f2a/getsentry/sentry-javascript/issues/323 |
| og:image:alt | Goals Support browserify, webpack, bower, and Sentry's CDN (which means native bundled distribution) Break raven.js into a more modular system, where the ideal installation doesnt use our CDN, but ... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | dcramer |
| hostname | github.com |
| expected-hostname | github.com |
| None | f8d9f404447ab5df341c8a92cf5fc927730ad1321e64ac57656444d2438097f1 |
| turbo-cache-control | no-preview |
| go-import | github.com/getsentry/sentry-javascript git https://github.com/getsentry/sentry-javascript.git |
| octolytics-dimension-user_id | 1396951 |
| octolytics-dimension-user_login | getsentry |
| octolytics-dimension-repository_id | 3328572 |
| octolytics-dimension-repository_nwo | getsentry/sentry-javascript |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 3328572 |
| octolytics-dimension-repository_network_root_nwo | getsentry/sentry-javascript |
| turbo-body-classes | logged-out env-production page-responsive |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | f7edccce04851591ee529948701779ce6819bc53 |
| ui-target | canary-1 |
| theme-color | #1e2327 |
| color-scheme | light dark |
| react-app-name | issues |
Links:
| Server | github.com |
| Content-Type | text/html; charset=utf-8 |
| Cache-Control | max-age=0, private, must-revalidate |
Viewport: width=device-width