-
Notifications
You must be signed in to change notification settings - Fork 77
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
fix: decorator visitor should run before preset env #1176
Conversation
Walkthrough总体变更概述:对构建过程、测试设置、优化配置和装饰器功能进行了调整和扩展。 Changes
Poem
Note Pull Request Summarized by CodeRabbit FreeYour organization is on the Free plan. CodeRabbit will generate a high-level summary and a walkthrough for each pull request. For a comprehensive line-by-line review, please upgrade your subscription to CodeRabbit Pro by visiting https://coderabbit.ai TipsChatThere are 3 ways to chat with CodeRabbit:
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 as PR comments)
Additionally, you can add CodeRabbit Configration File (
|
* test: ✅ add runtime assert in decorator and target to chrome 40 * fix: 🐛 move decorator before preset_env * add comment on decorators
* feat: ✨ add [d]ynamic [r]equire runtime function * refactor: 🎨 dynamic import require process with interop * test: ✅ add test case * test: ✅ import context module adjust to dynamic import * release: @umijs/mako@0.4.18-canary.20240517.1 * chore: ⬆️ mako 0.4.18-canary.20240517.1 * chore: ⬆️ update pnpm-lock * typo * fix: fix "too many files open" error when watching with-antd example (#1022) * fix: fix "too many files open" error when watching with-antd example * fix: include dist dictionary of root's parent dictionary when watching --------- Co-authored-by: zp365238 <zp365238@antgroup.com> Co-authored-by: pshu <pishu.spf@antfin.com> * chore: 🔧 adjust puffin for easy profile for both long time compiling and watch mode (#1168) * chore: 🔧 adjust puffin for easy profile for long time compiling * refactor: 🎨 move profile logic to profile app * fix: decorator visitor should run before preset env (#1176) * test: ✅ add runtime assert in decorator and target to chrome 40 * fix: 🐛 move decorator before preset_env * add comment on decorators * feat: add watch.ignorePaths config (#1179) * release: @umijs/mako@0.4.18-canary.20240520.1 * chore: ⬆️ v0.4.18-canary.20240520.1 * chore: ⬆️ update pnpm-lock --------- Co-authored-by: zhangpanweb <37805064+zhangpanweb@users.noreply.github.com> Co-authored-by: zp365238 <zp365238@antgroup.com> Co-authored-by: chencheng (云谦) <sorrycc@gmail.com>
if compile down to es5,
class
becomefunctions
, then the decorator on the function will be removed silentlyref: #1172
Summary by CodeRabbit
Transform
实现中更改了添加文件夹到folders
向量的顺序,现在在swc_preset_env::preset_env
之前添加了decorators
文件夹。expect.js
中的injectSimpleJest()
函数调用和新的require("./dist/index.js")
语句的添加。mako.config.json
文件中为Chrome 40版本添加了新的目标规范。src/index.ts
中为Foo
类添加了装饰器@bar()
,设置了类的属性bar
,并添加了用于验证装饰器功能的测试。