chore(tsconfig): remove deprecated compiler options - #158
Merged
Merged
Conversation
This was referenced Aug 22, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #157
改动
tsconfig.json:package.json:理由
baseUrl: "./":无paths别名、无 root-anchored 导入,纯死配置 → 删除moduleResolution: "Node"(node10):TS 6 deprecated、TS 7 移除。TS 5.x 下 CJS module 的唯一配套就是 node10,因此整体切到NodeNext"type": "module",NodeNext 下 .ts 仍按 CommonJS 输出(已验证lib/src/lint-md.js使用require()/exports.)isolatedModules: true:ts-jest 对 hybrid module kind 的要求,本身也是现代推荐项build:cjs去掉--module commonjs:与 tsconfig NodeNext 冲突;flag 冗余emit 不变 ≠ 解析语义不变
区分两件事:
exports、条件导出等解析规则,node10 不理解。这正是本 PR 想要的变化现有 typecheck、测试和真实打包安装(test:package)证明当前依赖树在新解析模型下没有问题。
验证(零源码修改)
npm run typechecknpm test -- --runInBandlib/仍为 CommonJSnpm run test:packagePR C(TypeScript 5.9 → 6.0)现在没有 deprecated config 阻碍了。