CONSOLE-5159: Replace deprecated Node10 moduleResolution with Bundler for TS6 compatibility#16259
CONSOLE-5159: Replace deprecated Node10 moduleResolution with Bundler for TS6 compatibility#16259sachaudh wants to merge 1 commit intoopenshift:mainfrom
Conversation
TypeScript 6 treats moduleResolution node10 as deprecated and emits TS5107 as a hard error. Since ModuleResolutionKind.NodeJs is an alias for Node10, this breaks any consumer using TypeScript 6+. The SDK only resolves relative paths within PatternFly packages' dist/esm/ and dist/dynamic/ directories, so Bundler resolution is functionally equivalent. This also prepares for TypeScript 7, where node10 will stop functioning entirely. Closes openshift#16258 Signed-off-by: Saif Chaudhry <schaudhr@redhat.com>
|
@sachaudh: This pull request references CONSOLE-5159 which is a valid jira issue. Warning: The referenced jira issue has an invalid target version for the target branch this PR targets: expected the bug to target the "4.22.0" version, but no target version was set. DetailsIn response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the openshift-eng/jira-lifecycle-plugin repository. |
|
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: sachaudh The full list of commands accepted by this bot can be found here. DetailsNeeds approval from an approver in each of these files:Approvers can indicate their approval by writing |
|
Hi @sachaudh. Thanks for your PR. I'm waiting for a openshift member to verify that this patch is reasonable to test. If it is, they should reply with Regular contributors should join the org to skip this step. Once the patch is verified, the new status will be reflected by the I understand the commands that are listed here. DetailsInstructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository. |
|
@sachaudh: This pull request references CONSOLE-5159 which is a valid jira issue. Warning: The referenced jira issue has an invalid target version for the target branch this PR targets: expected the bug to target the "4.22.0" version, but no target version was set. DetailsIn response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the openshift-eng/jira-lifecycle-plugin repository. |
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Repository YAML (base), Organization UI (inherited) Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (1)
📜 Recent review details🧰 Additional context used📓 Path-based instructions (1)**⚙️ CodeRabbit configuration file
Files:
🔇 Additional comments (1)
📝 WalkthroughWalkthroughThis change modifies the TypeScript compiler configuration within the dynamic module parser utility. The ✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
CONSOLE Features and Fixes:
Fixes TypeScript 6+ compatibility for
@openshift-console/dynamic-plugin-sdk-webpack.Jira: https://issues.redhat.com/browse/CONSOLE-5159
Solution description
getDynamicModuleMap()indynamic-module-parser.tshardcodesmoduleResolution: ts.ModuleResolutionKind.NodeJs(alias forNode10).TypeScript 6 treats this as a hard error (TS5107), breaking all consumers.
This replaces it with
ts.ModuleResolutionKind.Bundler, which is functionallyequivalent -- the SDK only resolves relative paths within PatternFly packages'
dist/esm/anddist/dynamic/directories.This also prepares for TypeScript 7, where
node10will stop functioning entirely.Closes #16258
Test cases:
@patternfly/react-core, zero errors)Additional info:
ignoreDeprecations: '6.0'instead, but that only suppresses the warning without removing the deprecated option@openshift-console/dynamic-plugin-sdk-webpackare affected, including latest4.22.0-prerelease.2Screen shots / gifs / design review:
N/A -- no UI changes
Summary by CodeRabbit