Title: Accidental breaking change on v15.7.0 · Issue #37705 · nodejs/node · GitHub
Open Graph Title: Accidental breaking change on v15.7.0 · Issue #37705 · nodejs/node
X Title: Accidental breaking change on v15.7.0 · Issue #37705 · nodejs/node
Description: Version: v15.7.0 Platform: OS X (should be reproducible on any OS) Subsystem: http2 What steps will reproduce the bug? This issue was introduced on #36505 Try to assign something to req on an instance of Http2ServerResponse. Example erro...
Open Graph Description: Version: v15.7.0 Platform: OS X (should be reproducible on any OS) Subsystem: http2 What steps will reproduce the bug? This issue was introduced on #36505 Try to assign something to req on an insta...
X Description: Version: v15.7.0 Platform: OS X (should be reproducible on any OS) Subsystem: http2 What steps will reproduce the bug? This issue was introduced on #36505 Try to assign something to req on an insta...
Opengraph URL: https://github.com/nodejs/node/issues/37705
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Accidental breaking change on v15.7.0","articleBody":"\u003c!--\r\nThank you for reporting an issue.\r\n\r\nThis issue tracker is for bugs and issues found within Node.js core.\r\nIf you require more general support please file an issue on our help\r\nrepo. https://github.com/nodejs/help\r\n\r\n\r\nPlease fill in as much of the template below as you're able.\r\n\r\nVersion: output of `node -v`\r\nPlatform: output of `uname -a` (UNIX), or output of `\"$([Environment]::OSVersion | ForEach-Object VersionString) $(if ([Environment]::Is64BitOperatingSystem) { \"x64\" } else { \"x86\" })\"` in PowerShell console (Windows)\r\nSubsystem: if known, please specify affected core module name\r\n--\u003e\r\n\r\n* **Version**: v15.7.0\r\n* **Platform**: OS X (should be reproducible on any OS)\r\n* **Subsystem**: http2\r\n\r\n### What steps will reproduce the bug?\r\n\r\nThis issue was introduced on https://github.com/nodejs/node/pull/36505\r\n\r\nTry to assign something to `req` on an instance of `Http2ServerResponse`.\r\nExample error: https://github.com/restify/node-restify/runs/2081960519?check_suite_focus=true#step:5:242\r\n\r\n```\r\nTypeError: Cannot set property req of [object Object] which has only a getter\r\n at Server._setupRequest (/home/runner/work/node-restify/node-restify/lib/server.js:1282:13)\r\n at Server._onRequest (/home/runner/work/node-restify/node-restify/lib/server.js:967:10)\r\n at Http2SecureServer.emit (node:events:378:20)\r\n at Http2SecureServer.EventEmitter.emit (node:domain:532:15)\r\n at Http2SecureServer.onServerStream (node:internal/http2/compat:870:10)\r\n at Http2SecureServer.emit (node:events:378:20)\r\n at Http2SecureServer.EventEmitter.emit (node:domain:532:15)\r\n at ServerHttp2Session.sessionOnStream (node:internal/http2/core:2930:19)\r\n at ServerHttp2Session.emit (node:events:378:20)\r\n at ServerHttp2Session.EventEmitter.emit (node:domain:532:15)\r\n```\r\n\r\nExample code: https://github.com/restify/node-restify/blob/master/lib/server.js#L1282\r\n\r\n### How often does it reproduce? Is there a required condition?\r\n\r\nEvery time\r\n\r\n### What is the expected behavior?\r\n\r\nThe code should not break on a `semver-minor`\r\n\r\n### What do you see instead?\r\n\r\nAn error is thrown\r\n\r\n### Additional information\r\n\r\nThis happens because getters are not assignable on strict mode. We can't revert the change because that would also be a breaking change, so we have two options:\r\n\r\n- Change it from a `getter` to a normal property, so that user code doesn't break. We can go back to a getter on `v16`\r\n- Leave as is, assuming that users shouldn't be assigning to the response object anyway and because v15 is not an LTS version, and then add a note to the changelogs that this was an accidental breaking change that won't be reverted\r\n\r\nIf we go with the latter we might want to discuss making all properties on req/res non-assignable (which IMO is not desirable).\r\n\r\ncc @nodejs/tsc @nodejs/http2 @nodejs/releasers","author":{"url":"https://github.com/mmarchini","@type":"Person","name":"mmarchini"},"datePublished":"2021-03-11T00:50:19.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":5},"url":"https://github.com/37705/node/issues/37705"}
| 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:c2605fa5-80e7-7067-e9e0-5058915996e0 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | E3D0:23E45A:18D10A9:20BBDCB:6A51CE1A |
| html-safe-nonce | 4e96809c95bde8314b0b834f34ca03edcedb9ed8d52a39005d1a5ad0eb04c5f0 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJFM0QwOjIzRTQ1QToxOEQxMEE5OjIwQkJEQ0I6NkE1MUNFMUEiLCJ2aXNpdG9yX2lkIjoiMzI4Njk1MjE3MDA2MzI1MzAxOCIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9 |
| visitor-hmac | 40d85a21bcf97e5dedcf45817e1377a4bc2d86bc4094dc0178ef8bd7a14d1a54 |
| hovercard-subject-tag | issue:828539118 |
| 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/nodejs/node/37705/issue_layout |
| twitter:image | https://opengraph.githubassets.com/df1a0f03917baa5a9a734c9d6544b79c7f2994d4dda87067efb76251d63fb11d/nodejs/node/issues/37705 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/df1a0f03917baa5a9a734c9d6544b79c7f2994d4dda87067efb76251d63fb11d/nodejs/node/issues/37705 |
| og:image:alt | Version: v15.7.0 Platform: OS X (should be reproducible on any OS) Subsystem: http2 What steps will reproduce the bug? This issue was introduced on #36505 Try to assign something to req on an insta... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | mmarchini |
| hostname | github.com |
| expected-hostname | github.com |
| None | b9a586c06a05a7a86fc7e3f4dbd03e42f6869085879aa184aa6369456dbd50fb |
| turbo-cache-control | no-preview |
| go-import | github.com/nodejs/node git https://github.com/nodejs/node.git |
| octolytics-dimension-user_id | 9950313 |
| octolytics-dimension-user_login | nodejs |
| octolytics-dimension-repository_id | 27193779 |
| octolytics-dimension-repository_nwo | nodejs/node |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 27193779 |
| octolytics-dimension-repository_network_root_nwo | nodejs/node |
| 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 | 7aed05249554b889eb33d002851a973eebcc7e91 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width