Title: CommonJS module output broken after updating from 5.5.4 to 5.6.2 · Issue #59991 · microsoft/TypeScript · GitHub
Open Graph Title: CommonJS module output broken after updating from 5.5.4 to 5.6.2 · Issue #59991 · microsoft/TypeScript
X Title: CommonJS module output broken after updating from 5.5.4 to 5.6.2 · Issue #59991 · microsoft/TypeScript
Description: 🔎 Search Terms 5.6 commonjs cjs node10 moduleResolution modules regression 🕗 Version & Regression Information This changed between versions 5.5.4 and 5.6.2 This changed in commit or PR: Example of the failure on inquirer SBoudrias/Inquir...
Open Graph Description: 🔎 Search Terms 5.6 commonjs cjs node10 moduleResolution modules regression 🕗 Version & Regression Information This changed between versions 5.5.4 and 5.6.2 This changed in commit or PR: Example of ...
X Description: 🔎 Search Terms 5.6 commonjs cjs node10 moduleResolution modules regression 🕗 Version & Regression Information This changed between versions 5.5.4 and 5.6.2 This changed in commit or PR: Example...
Opengraph URL: https://github.com/microsoft/TypeScript/issues/59991
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"CommonJS module output broken after updating from 5.5.4 to 5.6.2","articleBody":"### 🔎 Search Terms\r\n\r\n5.6 commonjs cjs node10 moduleResolution modules regression\r\n\r\n### 🕗 Version \u0026 Regression Information\r\n\r\n- This changed between versions 5.5.4 and 5.6.2\r\n- This changed in commit or PR: Example of the failure on `inquirer` https://github.com/SBoudrias/Inquirer.js/pull/1554\r\n\r\n### ⏯ Playground Link\r\n\r\nhttps://github.com/SBoudrias/Inquirer.js/pull/1554\r\n\r\n### 💻 Code\r\n\r\nMy tsconfig.cjs.json\r\n\r\n```ts\r\n{\r\n \"extends\": \"./tsconfig.json\",\r\n \"compilerOptions\": {\r\n \"lib\": [\"es2023\"],\r\n \"target\": \"es6\",\r\n \"module\": \"commonjs\",\r\n \"moduleResolution\": \"node10\",\r\n \"outDir\": \"dist/cjs\",\r\n \"declarationDir\": \"dist/cjs/types\"\r\n }\r\n}\r\n```\r\n\r\n### 🙁 Actual behavior\r\n\r\nThe files outputted in `dist/cjs` are now using esm module syntax instead fo cjs (`import ... from`).\r\n\r\n### 🙂 Expected behavior\r\n\r\nAs of version 5.5.4, the files outputted in `dist/cjs` were cjs (`require(...)`).\r\n\r\n### Additional information about the issue\r\n\r\n_No response_","author":{"url":"https://github.com/SBoudrias","@type":"Person","name":"SBoudrias"},"datePublished":"2024-09-17T19:10:12.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":8},"url":"https://github.com/59991/TypeScript/issues/59991"}
| 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:3f6a1f06-56a7-e4ac-d4a4-578849c75da3 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | 8BDE:53774:1FEA437:2A96BBF:6A5D6173 |
| html-safe-nonce | cb352306d85905d80182029e805740116789f9d82a5ea7e824b9ab67b8273c00 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiI4QkRFOjUzNzc0OjFGRUE0Mzc6MkE5NkJCRjo2QTVENjE3MyIsInZpc2l0b3JfaWQiOiI0NDg2MjYzMjcyODM3NTcwOTMxIiwicmVnaW9uX2VkZ2UiOiJpYWQiLCJyZWdpb25fcmVuZGVyIjoiaWFkIn0= |
| visitor-hmac | 51350224e714745b241be54f3558b107a7b744be727bdd619fe8e5bc7b895451 |
| hovercard-subject-tag | issue:2531897151 |
| 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/microsoft/TypeScript/59991/issue_layout |
| twitter:image | https://opengraph.githubassets.com/c2914ea99bcd1c2445a7e89412fbb68e95eede574f98ce4230116078e17c1146/microsoft/TypeScript/issues/59991 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/c2914ea99bcd1c2445a7e89412fbb68e95eede574f98ce4230116078e17c1146/microsoft/TypeScript/issues/59991 |
| og:image:alt | 🔎 Search Terms 5.6 commonjs cjs node10 moduleResolution modules regression 🕗 Version & Regression Information This changed between versions 5.5.4 and 5.6.2 This changed in commit or PR: Example of ... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | SBoudrias |
| hostname | github.com |
| expected-hostname | github.com |
| None | 5290d7e14309ad1e76106a9c4237bd1041517e83ea182c8ab756752cb0c6940b |
| turbo-cache-control | no-preview |
| go-import | github.com/microsoft/TypeScript git https://github.com/microsoft/TypeScript.git |
| octolytics-dimension-user_id | 6154722 |
| octolytics-dimension-user_login | microsoft |
| octolytics-dimension-repository_id | 20929025 |
| octolytics-dimension-repository_nwo | microsoft/TypeScript |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 20929025 |
| octolytics-dimension-repository_network_root_nwo | microsoft/TypeScript |
| 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 | 9c975978430e9ad293956f2bbdaf153b1bd84a99 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width