Title: Node types can be used in any package · Issue #5834 · getsentry/sentry-javascript · GitHub
Open Graph Title: Node types can be used in any package · Issue #5834 · getsentry/sentry-javascript
X Title: Node types can be used in any package · Issue #5834 · getsentry/sentry-javascript
Description: Steps to Reproduce Go into any file in @sentry/utils and add a reference to global.process.version and no error is reported during TypeScript compilation. But why? Following the definitions in vscode, I suspect this is due to @types/node...
Open Graph Description: Steps to Reproduce Go into any file in @sentry/utils and add a reference to global.process.version and no error is reported during TypeScript compilation. But why? Following the definitions in vsco...
X Description: Steps to Reproduce Go into any file in @sentry/utils and add a reference to global.process.version and no error is reported during TypeScript compilation. But why? Following the definitions in vsco...
Opengraph URL: https://github.com/getsentry/sentry-javascript/issues/5834
X: @github
Domain: github.com
IPv4 address: 140.82.112.3
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Node types can be used in any package","articleBody":"### Steps to Reproduce\r\n\r\nGo into any file in `@sentry/utils` and add a reference to `global.process.version` and no error is reported during TypeScript compilation.\r\n\r\n### But why?\r\n\r\nFollowing the definitions in vscode, I suspect this is due to `@types/node` in the root `node_modules`. TypeScript loads everything in `@types/*` automatically and appears to use node module resolution traversal.\r\n\r\n### Solutions?\r\n\r\nIf I remove `@types/node` from the root `package.json` the package is remains there due to hoisting but the version changes to v17 rather than the current `10.17.56` which is even worse. We may be able to work around this via the yarn workspace [nohoist](https://classic.yarnpkg.com/blog/2018/02/15/nohoist/) option.\r\n\r\nWe may be able to improve the situation by adding `global` to the `no-restricted-globals` eslint rule.","author":{"url":"https://github.com/timfish","@type":"Person","name":"timfish"},"datePublished":"2022-09-27T12:37:44Z","url":"https://github.com/getsentry/sentry-javascript/issues/5834"}
| 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:c7657f68-097f-7b17-0903-ff647688a349 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | CA08:2B774B:539808:75C39D:6B0415D4 |
| html-safe-nonce | 7f638f74351d2685f08a371128a54e8a5d6e3d7591768d63d5549d9e3f0e98fe |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJDQTA4OjJCNzc0Qjo1Mzk4MDg6NzVDMzlEOjZCMDQxNUQ0IiwidmlzaXRvcl9pZCI6IjY3NTY3NjcyNDM5MDYwNjE3ODAiLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ== |
| visitor-hmac | afef85fcd10106a699e893896738284a87b6c3b9a384be15c136be936f455193 |
| hovercard-subject-tag | issue:1387690985 |
| 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/5834/issue_layout |
| twitter:image | https://opengraph.githubassets.com/6dba133159cf1f492e76cad9985e115cb1cef994cc2ed65044da7ab63f81be69/getsentry/sentry-javascript/issues/5834 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/6dba133159cf1f492e76cad9985e115cb1cef994cc2ed65044da7ab63f81be69/getsentry/sentry-javascript/issues/5834 |
| og:image:alt | Steps to Reproduce Go into any file in @sentry/utils and add a reference to global.process.version and no error is reported during TypeScript compilation. But why? Following the definitions in vsco... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | timfish |
| hostname | github.com |
| expected-hostname | github.com |
| None | 87e774ee7c6b3bee0490394e4d3e57ec9dbc956f74b87ea685dc8996c1676456 |
| 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 | 423dbb54c5e7bfecc838eb387c1435eb3d0e760d |
| ui-target | full |
| 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