-
Notifications
You must be signed in to change notification settings - Fork 408
feat: del old dsl export function #1434
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
WalkthroughThe changes remove the exports for Changes
Poem
📜 Recent review detailsConfiguration used: CodeRabbit UI 📒 Files selected for processing (1)
💤 Files with no reviewable changes (1)
⏰ Context from checks skipped due to timeout of 90000ms (1)
✨ Finishing Touches
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. 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
SupportNeed help? Create a ticket on our support page for assistance with any issues or questions. Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
CodeRabbit Configuration File (
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 1
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (2)
packages/vue-generator/src/generator/index.js
(0 hunks)packages/vue-generator/src/index.js
(1 hunks)
💤 Files with no reviewable changes (1)
- packages/vue-generator/src/generator/index.js
English | 简体中文
PR 删除 DSL v1.x 出码导出函数
PR Checklist
Please check if your PR fulfills the following requirements:
PR Type
What kind of change does this PR introduce?
Background and solution
【问题背景】
原有的 DSL v1.x,是给 Nodejs 环境使用的。
所以在
packages/vue-generator/src/utils/vue-sfc-validator.js
中,直接对vue-eslint-parser
进行了 require。问题:
在 #1349 中,发布了 alpha 版本之后,二开工程打包,会报错:
【问题分析】
@opentiny/tiny-enging-.*
都进行了 external,为了可以在用户二开工程做 tree-shaking。@opentiny/tiny-engine-dsl-vue
中指定了依赖"vue-eslint-parser": "8.3.0"
,子依赖为 eslint。@opentiny/tiny-enging-.*
external 之前,tiny-engine 的 monorepo 工程解析"vue-eslint-parser": "8.3.0"
的 eslint 子依赖版本为8.57.1
。@opentiny/tiny-enging-.*
external 之后,在用户的二开工程,"vue-eslint-parser": "8.3.0"
的 eslint 子依赖版本可能被解析为 9+。eslint 9+ 的版本引入了 @HumanFS 相关的依赖,且没有正确解析
node:url
相关依赖。导致构建报错。为什么未将所有的
@opentiny/tiny-enging-.*
external 之前不会报错?@opentiny/tiny-enging-.*
external 之前,tiny-engine 的 monorepo 工程解析"vue-eslint-parser": "8.3.0"
的 eslint 子依赖版本为8.57.1
。@opentiny/tiny-engine
打包阶段的时候,vue-eslint-parser
package 就已经被 tree-shaking了,在用户二开工程不涉及该代码片段的重新打包。【解决方案】
将 v1.x 的出码导出函数删除,这样在
@opentiny/tiny-engine-dsl-vue
打包阶段,就可以直接被 tree-shaking。(后续确定 v1.x 导出函数不再被其他外部 package 引用,无副作用之后,将相关代码实现删除。
What is the current behavior?
Issue Number: N/A
What is the new behavior?
Does this PR introduce a breaking change?
Other information
Summary by CodeRabbit