feat: support case sensitive#1714
Conversation
|
Warning Rate limit exceeded@notcold has exceeded the limit for the number of commits or files that can be reviewed per hour. Please wait 21 minutes and 47 seconds before requesting another review. ⌛ How to resolve this issue?After the wait time has elapsed, a review can be triggered using the We recommend that you space out your commits to avoid hitting the rate limit. 🚦 How do rate limits work?CodeRabbit enforces hourly rate limits for each developer per organization. Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout. Please see our FAQ for further information. 📒 Files selected for processing (1)
概述步骤说明本次更改引入了一个新的大小写敏感性检查插件,专门针对 macOS 平台。该插件可以检查文件路径的大小写是否匹配,并在配置中通过 变更
可能相关的 PR
诗歌
Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media? 🪧 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 using PR comments)
Other keywords and placeholders
CodeRabbit Configuration File (
|
WalkthroughThis PR introduces a new plugin, Changes
|
There was a problem hiding this comment.
Actionable comments posted: 2
🧹 Outside diff range and nitpick comments (2)
crates/mako/src/plugins/case_sensitive.rs (1)
70-72: 建议使用日志库替换 println!在生产环境中,直接使用
println!进行输出可能不是最佳实践。建议使用诸如log等日志库,以便更好地控制日志级别和输出目的地。在第70-72行和第88行,您使用了println!,可以考虑替换为适当的日志记录方法。您可以参考以下修改:
- println!( - "File name is case-insensitive. Correct name is: {}", - correct_name - ); + log::warn!( + "文件名大小写不匹配,正确的名称是:{}", + correct_name + ); - println!("case_sensitive_plugin"); + log::info!("case_sensitive_plugin");Also applies to: 88-88
crates/mako/src/plugins.rs (1)
3-3: 代码格式一致性建议在第3行,添加了新的模块声明
pub mod case_sensitive;。为了保持代码风格的一致性,建议在模块列表中按照字母顺序排列模块,或根据模块功能分类排序,以提高可读性和维护性。
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
⛔ Files ignored due to path filters (1)
crates/mako/test/build/case-sensitive/assets/umi-logo.pngis excluded by!**/*.png
📒 Files selected for processing (6)
crates/mako/src/compiler.rs(1 hunks)crates/mako/src/plugins.rs(1 hunks)crates/mako/src/plugins/case_sensitive.rs(1 hunks)crates/mako/test/build/case-sensitive/index.ts(1 hunks)crates/mako/test/build/case-sensitive/mako.config.json(1 hunks)crates/mako/test/build/case-sensitive/package.json(1 hunks)
✅ Files skipped from review due to trivial changes (3)
- crates/mako/test/build/case-sensitive/index.ts
- crates/mako/test/build/case-sensitive/mako.config.json
- crates/mako/test/build/case-sensitive/package.json
🔇 Additional comments (1)
crates/mako/src/compiler.rs (1)
247-247: 确认插件添加顺序是否合理
在第247行,将 CaseSensitivePlugin 添加到了内置插件列表中。插件的顺序可能影响其执行顺序,进而影响插件之间的交互。请确保 CaseSensitivePlugin 放置在合适的位置,以避免潜在的依赖问题。
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #1714 +/- ##
==========================================
- Coverage 54.92% 54.78% -0.15%
==========================================
Files 180 181 +1
Lines 17931 17981 +50
==========================================
+ Hits 9848 9850 +2
- Misses 8083 8131 +48 ☔ View full report in Codecov by Sentry. |
There was a problem hiding this comment.
Actionable comments posted: 3
🧹 Outside diff range and nitpick comments (2)
crates/mako/src/plugins/case_sensitive.rs (2)
1-14: 结构设计合理,建议添加文档注释结构体的设计使用
Arc<Mutex<HashMap>>实现了线程安全的缓存,这是一个很好的选择。不过建议为CaseSensitivePlugin添加文档注释,说明其用途和工作原理。+/// 用于检查文件名大小写敏感性的插件 +/// +/// 该插件维护了一个线程安全的缓存,用于存储目录下的文件名, +/// 以避免重复的文件系统访问。 pub struct CaseSensitivePlugin { cache_map: Arc<Mutex<HashMap<String, Vec<String>>>>, }
102-125: 建议增加更多测试用例当前测试覆盖率不够完整,建议添加以下测试场景:
- 正常情况(大小写匹配)的测试
node_modules路径的跳过测试- 不同层级目录的测试
- 缓存机制的测试
#[test] - fn test_case_sensitive_checker() { + fn test_case_sensitive_mismatch() { let root = PathBuf::from(env!("CARGO_MANIFEST_DIR")).join("test/build/case-sensitive"); let compiler = setup_compiler("test/build/case-sensitive", false); let plugin = CaseSensitivePlugin::new(); let file = &File::new( root.join("Assets/umi-logo.png") .to_string_lossy() .to_string(), compiler.context.clone(), ); let result = plugin.load(&PluginLoadParam { file }, &compiler.context); assert!(result.is_err()); } + + #[test] + fn test_case_sensitive_match() { + let root = PathBuf::from(env!("CARGO_MANIFEST_DIR")).join("test/build/case-sensitive"); + let compiler = setup_compiler("test/build/case-sensitive", false); + let plugin = CaseSensitivePlugin::new(); + let file = &File::new( + root.join("assets/umi-logo.png") + .to_string_lossy() + .to_string(), + compiler.context.clone(), + ); + let result = plugin.load(&PluginLoadParam { file }, &compiler.context); + assert!(result.is_ok()); + } + + #[test] + fn test_node_modules_skip() { + let root = PathBuf::from(env!("CARGO_MANIFEST_DIR")).join("test/build/case-sensitive"); + let compiler = setup_compiler("test/build/case-sensitive", false); + let plugin = CaseSensitivePlugin::new(); + let file = &File::new( + root.join("node_modules/package/Test.js") + .to_string_lossy() + .to_string(), + compiler.context.clone(), + ); + let result = plugin.load(&PluginLoadParam { file }, &compiler.context); + assert!(result.is_ok()); + }
|
!bench |
sorrycc
left a comment
There was a problem hiding this comment.
1、用例组织请放到 e2e/fixtures 下,比如 error.case_sensitive,然后参考 https://github.com/umijs/mako/blob/master/e2e/fixtures/error.less.syntax-error/expect.js#L4 的方式对 error 做断言
2、这个功能配置开启吧,因为担心潜在的性能问题。增加一个 caseSensitiveCheck 的配置后才启用,同时应该只有 mac 下才需要,所以非 mac 平台也不需要启用这个功能
|
@sorrycc 调整好了,有空再review下 |
There was a problem hiding this comment.
Actionable comments posted: 1
🧹 Nitpick comments (4)
crates/mako/src/plugins/case_sensitive.rs (1)
90-94: 增强错误消息的可读性错误消息可以更清晰地描述问题。
建议修改为:
-return Err(anyhow!( - "{} does not match the corresponding path on disk [{}]", - load_param.file.path.to_string_lossy().to_string(), - dist_path -)); +return Err(anyhow!( + "文件路径大小写不匹配\n期望: {}\n实际: {}", + dist_path, + load_param.file.path.display() +));crates/mako/src/compiler.rs (1)
272-275: 代码逻辑正确,建议添加注释说明条件判断和插件初始化的逻辑正确。建议为这段代码添加注释,说明为什么只在 macOS 平台启用此插件。
建议添加如下注释:
#[cfg(target_os = "macos")] +// macOS 默认文件系统是大小写不敏感的,需要特殊处理 if config.case_sensitive_check { plugins.push(Arc::new(plugins::case_sensitive::CaseSensitivePlugin::new())); }crates/mako/src/config.rs (2)
222-225: 配置字段定义正确,建议改进文档配置字段的定义和序列化注解使用正确。建议改进注释的表述,使其更加清晰和专业。
建议修改注释如下:
- // 是否开启 case sensitive 检查,只有mac平台才需要开启 + /// 是否开启文件系统大小写敏感检查 + /// + /// 由于 macOS 默认使用大小写不敏感的文件系统(Case-insensitive APFS), + /// 此选项仅在 macOS 平台下有效,用于检测可能由大小写引起的文件路径问题。 #[serde(rename = "caseSensitiveCheck", default = "default_case_sensitive")] pub case_sensitive_check: bool,
227-229: 建议为默认值函数添加文档注释函数实现正确,但建议添加文档注释说明其用途和行为。
建议添加如下文档:
+/// 返回是否默认开启大小写敏感检查 +/// +/// 仅在 macOS 平台返回 true,因为只有 macOS 的默认文件系统是大小写不敏感的。 fn default_case_sensitive() -> bool { std::env::consts::OS == "macos" }
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
⛔ Files ignored due to path filters (1)
e2e/fixtures/error.case-sensitive/assets/umi-logo.pngis excluded by!**/*.png
📒 Files selected for processing (8)
crates/mako/src/compiler.rs(1 hunks)crates/mako/src/config.rs(1 hunks)crates/mako/src/plugins/case_sensitive.rs(1 hunks)e2e/fixtures/error.case-sensitive/expect.js(1 hunks)e2e/fixtures/error.case-sensitive/index.ts(1 hunks)e2e/fixtures/error.case-sensitive/mako.config.json(1 hunks)e2e/fixtures/error.case-sensitive/package.json(1 hunks)packages/mako/binding.d.ts(2 hunks)
✅ Files skipped from review due to trivial changes (3)
- e2e/fixtures/error.case-sensitive/mako.config.json
- e2e/fixtures/error.case-sensitive/index.ts
- e2e/fixtures/error.case-sensitive/package.json
🔇 Additional comments (4)
e2e/fixtures/error.case-sensitive/expect.js (1)
1-8: 测试用例实现正确!
测试用例正确验证了大小写敏感性检查的错误消息,确保了插件的预期行为。
crates/mako/src/plugins/case_sensitive.rs (2)
41-41:
改进锁处理机制
当前的锁处理方式可能在并发场景下导致问题。建议使用更安全的错误处理方式。
建议修改为:
-let mut cache_map = self.cache_map.lock().unwrap_or_else(|e| e.into_inner());
+let mut cache_map = match self.cache_map.lock() {
+ Ok(guard) => guard,
+ Err(poisoned) => {
+ log::error!("缓存映射锁被污染: {}", poisoned);
+ return String::new();
+ }
+};Likely invalid or redundant comment.
50-55:
优化文件系统操作的错误处理
当前的文件系统操作错误处理不够健壮,可能导致运行时panic。
建议修改为:
-else if let Ok(files) = fs::read_dir(dir) {
- files.for_each(|entry| {
- entries.push(entry.unwrap().file_name().to_string_lossy().to_string());
- });
- cache_map.insert(dir.to_string(), entries.to_vec());
+else {
+ match fs::read_dir(dir) {
+ Ok(files) => {
+ for entry in files.flatten() {
+ entries.push(entry.file_name().to_string_lossy().to_string());
+ }
+ cache_map.insert(dir.to_string(), entries.clone());
+ }
+ Err(e) => {
+ log::warn!("读取目录失败: {}", e);
+ }
+ }
+}Likely invalid or redundant comment.
packages/mako/binding.d.ts (1)
184-188: 类型定义更新正确!
新增的配置选项定义清晰,类型安全性良好。stats和optimization的扩展符合TypeScript最佳实践。
Also applies to: 239-239
sorrycc
left a comment
There was a problem hiding this comment.
1、test/build/case-sensitive 的作用是啥?没用的话可以去掉
2、config.md 和 config.zh-CN.md 里同步更新下文档的部分
3、crates/binding/src/lib.rs 里补下配置的类型
There was a problem hiding this comment.
Actionable comments posted: 2
🧹 Nitpick comments (2)
crates/mako/src/plugins/case_sensitive.rs (2)
12-14: 建议添加结构体文档注释为了提高代码的可维护性和可读性,建议为
CaseSensitivePlugin结构体添加详细的文档注释,包括:
- 结构体的主要功能和用途
cache_map字段的作用和数据结构说明- 线程安全性相关说明
+/// 文件路径大小写敏感性检查插件 +/// +/// 用于验证文件系统中文件路径的大小写是否与实际匹配。 +/// 使用线程安全的缓存机制来存储目录条目,以提高性能。 pub struct CaseSensitivePlugin { + /// 缓存目录内容的线程安全映射 + /// key: 目录路径 + /// value: 目录下的文件和文件夹名称列表 cache_map: Arc<Mutex<HashMap<String, Vec<String>>>>, }
17-21: 建议添加构造函数文档注释为构造函数添加文档注释,说明其用途和返回值。
+ /// 创建一个新的大小写敏感性检查插件实例 + /// + /// # Returns + /// 返回一个初始化的 `CaseSensitivePlugin` 实例,其中包含一个空的缓存映射 pub fn new() -> Self { CaseSensitivePlugin { cache_map: Default::default(), } }
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (2)
crates/mako/src/compiler.rs(1 hunks)crates/mako/src/plugins/case_sensitive.rs(1 hunks)
🚧 Files skipped from review as they are similar to previous changes (1)
- crates/mako/src/compiler.rs
🔇 Additional comments (1)
crates/mako/src/plugins/case_sensitive.rs (1)
86-91: 改进错误消息的可读性和信息量
错误消息应该更加清晰和具有描述性,包含预期和实际的文件路径。
- return Err(anyhow!(
- "{} does not match the corresponding path on disk [{}]",
- load_param.file.path.to_string_lossy().to_string(),
- dist_path
- ));
+ return Err(anyhow!(
+ "文件路径大小写不匹配\n预期: {}\n实际: {}",
+ dist_path,
+ load_param.file.path.display()
+ ));|
1、mac only 的逻辑为啥删了? |
|
ci环境不是mac单侧执行挂了,我就去掉试一下,顺序我改一下 |
There was a problem hiding this comment.
Actionable comments posted: 1
🧹 Nitpick comments (4)
e2e/fixtures/error.case-sensitive/expect.js (1)
5-14: 建议改进错误处理的可维护性当前的实现存在以下问题:
- 错误消息直接硬编码在代码中
- 平台特定的逻辑可能需要更好的文档说明
建议进行如下改进:
+ // 定义常量提高可维护性 + const ERROR_MESSAGES = { + MAC_CASE_MISMATCH: `/Assets/umi-logo.png does not match the corresponding path on disk [assets]`, + MISSING_INDEX: `should have file: index.js` + }; module.exports = (err) => { if (os.platform() === 'darwin') { assert( - err.stderr.includes(`/Assets/umi-logo.png does not match the corresponding path on disk [assets]`), + err.stderr.includes(ERROR_MESSAGES.MAC_CASE_MISMATCH), "should throw error" ); } else { - assert("index.js" in files, "should have file: index.js"); + assert("index.js" in files, ERROR_MESSAGES.MISSING_INDEX); } };另外,建议添加注释说明不同平台的处理逻辑。
crates/mako/src/plugins/case_sensitive.rs (3)
12-21: 建议添加结构体和方法的文档注释为了提高代码的可维护性和可读性,建议为结构体和方法添加详细的文档注释。
+/// 用于检查文件路径大小写敏感性的插件 +/// +/// 该插件使用缓存机制来存储目录条目,以提高性能 pub struct CaseSensitivePlugin { + /// 缓存映射,用于存储目录路径到其包含的文件名列表的映射 cache_map: Arc<Mutex<HashMap<String, Vec<String>>>>, } impl CaseSensitivePlugin { + /// 创建一个新的 CaseSensitivePlugin 实例 + /// + /// # Returns + /// 返回初始化后的插件实例 pub fn new() -> Self { CaseSensitivePlugin { cache_map: Default::default(), } }
23-34: 优化路径检查逻辑当前实现可以通过以下几点来改进:
- 使用常量定义排除目录
- 改进路径组件的处理方式
+ /// 需要排除的目录列表 + const EXCLUDED_DIRS: &[&str] = &["node_modules"]; + pub fn is_checkable(&self, load_param: &PluginLoadParam, root: &String) -> bool { let file_path = &load_param.file.path; if !file_path.starts_with(root) { return false; } for component in file_path.iter() { - if component.eq_ignore_ascii_case("node_modules") { + let component_str = component.to_string_lossy(); + if Self::EXCLUDED_DIRS.iter().any(|&dir| component_str.eq_ignore_ascii_case(dir)) { return false; } } true }
86-91: 改进错误消息的可读性当前的错误消息可以更清晰地描述问题所在,帮助用户更好地理解和解决问题。
return Err(anyhow!( - "{} does not match the corresponding path on disk [{}]", - load_param.file.path.to_string_lossy().to_string(), - dist_path + "文件路径大小写不匹配\n期望的路径: {}\n实际的路径: {}", + dist_path, + load_param.file.path.display() ));
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (6)
.github/workflows/ci.yml(2 hunks)crates/mako/src/compiler.rs(1 hunks)crates/mako/src/plugins/case_sensitive.rs(1 hunks)docs/config.md(1 hunks)docs/config.zh-CN.md(2 hunks)e2e/fixtures/error.case-sensitive/expect.js(1 hunks)
🚧 Files skipped from review as they are similar to previous changes (3)
- docs/config.zh-CN.md
- docs/config.md
- crates/mako/src/compiler.rs
🔇 Additional comments (5)
e2e/fixtures/error.case-sensitive/expect.js (1)
6-11: 验证 macOS 特定逻辑的正确性
需要验证 macOS 平台下的错误处理逻辑是否与预期一致。
✅ Verification successful
Let me gather more information about the test case and its context.
让我再检查一下测试用例的目录结构,特别是大小写敏感的部分。
macOS 大小写敏感测试用例验证完成
该测试用例正确实现了对 macOS 平台特定的大小写敏感性检查:
- 测试目录中存在小写的
assets目录,而错误信息中检查的是大写的Assets路径 - 这正确反映了 macOS 文件系统默认大小写不敏感的特性
- 错误消息准确描述了路径不匹配的问题
🏁 Scripts executed
The following scripts were executed for the analysis:
Script:
#!/bin/bash
# 检查是否存在其他与大小写相关的测试用例
rg -l "case.*sensitive" --type js
# 检查是否有其他地方使用了类似的错误消息
rg "does not match the corresponding path on disk" --type js
Length of output: 248
Script:
#!/bin/bash
# 检查测试文件的完整内容
cat e2e/fixtures/error.case-sensitive/expect.js
# 查找相关的测试资源文件
fd -t f "umi-logo.png" -x ls -l {}
# 检查是否有其他平台相关的测试
rg "os\.platform\(\)" -A 2 --type js
Length of output: 1433
Script:
#!/bin/bash
# 检查测试目录结构,特别关注大小写情况
ls -la e2e/fixtures/error.case-sensitive/
# 检查是否存在大写的 Assets 目录
find e2e/fixtures/error.case-sensitive/ -type d -iname "assets"
Length of output: 574
crates/mako/src/plugins/case_sensitive.rs (2)
50-55:
优化文件系统操作的错误处理和性能
当前实现存在以下问题:
- 直接使用
unwrap处理文件系统操作可能导致程序崩溃 - 不必要的
to_vec克隆操作影响性能
- } else if let Ok(files) = fs::read_dir(dir) {
- files.for_each(|entry| {
- entries.push(entry.unwrap().file_name().to_string_lossy().to_string());
- });
- cache_map.insert(dir.to_string(), entries.to_vec());
+ } else {
+ match fs::read_dir(dir) {
+ Ok(files) => {
+ for entry in files.flatten() {
+ entries.push(entry.file_name().to_string_lossy().to_string());
+ }
+ cache_map.insert(dir.to_string(), entries.clone());
+ }
+ Err(e) => {
+ log::warn!("读取目录失败 '{}': {}", dir, e);
+ continue;
+ }
+ }Likely invalid or redundant comment.
41-41:
改进锁的错误处理机制
直接使用 unwrap_or_else 处理锁的 PoisonError 可能会导致数据不一致。建议添加适当的错误处理。
- let mut cache_map = self.cache_map.lock().unwrap_or_else(|e| e.into_inner());
+ let mut cache_map = match self.cache_map.lock() {
+ Ok(guard) => guard,
+ Err(poisoned) => {
+ log::error!("缓存映射锁被污染: {}", poisoned);
+ return String::new();
+ }
+ };Likely invalid or redundant comment.
.github/workflows/ci.yml (2)
51-51: 支持 macOS 构建的更改已正确实现
添加 macos-latest 到构建矩阵是合适的,这样可以确保在 macOS 环境下测试大小写敏感性功能。
93-93: E2E 测试矩阵配置正确
在 E2E 测试中添加 macos-latest 与构建作业的更改保持一致,确保了完整的跨平台测试覆盖。
There was a problem hiding this comment.
Actionable comments posted: 1
♻️ Duplicate comments (1)
crates/mako/src/plugins/case_sensitive.rs (1)
41-41:⚠️ Potential issue改进锁的错误处理
直接使用
unwrap_or_else处理PoisonError可能会掩盖并发问题。
🧹 Nitpick comments (3)
crates/mako/src/plugins/case_sensitive.rs (3)
12-14: 结构体文档缺失建议为
CaseSensitivePlugin结构体添加文档注释,说明其用途和功能。建议添加如下文档:
+/// 用于检查文件路径大小写敏感性的插件 +/// +/// 该插件主要用于在 macOS 系统上验证文件路径的大小写是否与磁盘上的实际路径匹配。 +/// 使用缓存机制来优化性能,减少文件系统访问。 pub struct CaseSensitivePlugin { cache_map: Arc<Mutex<HashMap<String, Vec<String>>>>, }
86-91: 改进错误消息的可读性错误消息可以更清晰地描述问题,并提供更多上下文信息。
建议修改为:
- return Err(anyhow!( - "{} does not match the corresponding path on disk [{}]", - load_param.file.path.to_string_lossy().to_string(), - dist_path - )); + return Err(anyhow!( + "文件路径大小写不匹配\n期望: {}\n实际: {}\n请确保文件名大小写与磁盘上的实际文件名完全匹配", + dist_path, + load_param.file.path.display() + ));
107-119: 增强测试用例覆盖率当前测试仅覆盖了错误情况,建议添加更多测试场景:
- 正常情况(大小写匹配)
- 不同的目录层级
- 特殊字符路径
建议添加如下测试用例:
#[test] fn test_case_sensitive_checker_success() { let root = PathBuf::from(env!("CARGO_MANIFEST_DIR")).join("test/build/case-sensitive"); let compiler = setup_compiler("test/build/case-sensitive", false); let plugin = CaseSensitivePlugin::new(); // 测试正确的大小写 let file = &File::new( root.join("assets/umi-logo.png") .to_string_lossy() .to_string(), compiler.context.clone(), ); let result = plugin.load(&PluginLoadParam { file }, &compiler.context); assert!(result.is_ok()); }
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (2)
crates/mako/src/config/mako.config.default.json(1 hunks)crates/mako/src/plugins/case_sensitive.rs(1 hunks)
🔇 Additional comments (1)
crates/mako/src/plugins/case_sensitive.rs (1)
50-55:
优化文件系统操作和错误处理
当前实现在处理文件系统操作时存在以下问题:
- 未正确处理
unwrap可能导致的错误 - 重复克隆
entries向量 - 缺少错误日志
建议修改为:
- } else if let Ok(files) = fs::read_dir(dir) {
- files.for_each(|entry| {
- entries.push(entry.unwrap().file_name().to_string_lossy().to_string());
- });
- cache_map.insert(dir.to_string(), entries.to_vec());
+ } else {
+ match fs::read_dir(dir) {
+ Ok(files) => {
+ for entry in files {
+ match entry {
+ Ok(entry) => entries.push(entry.file_name().to_string_lossy().to_string()),
+ Err(e) => log::warn!("读取目录条目失败: {}", e),
+ }
+ }
+ cache_map.insert(dir.to_string(), entries.clone());
+ }
+ Err(e) => {
+ log::error!("读取目录 '{}' 失败: {}", dir, e);
+ }
+ }Likely invalid or redundant comment.
|
@sorrycc 覆盖率怎么办,ubuntu下执行,不会触发代码逻辑,所以覆盖率就算不进去 |
覆盖率不用管。 |
* fix: env_replacer should not replace user defined variable in scope (#1577) * fix: env_replacer should not replace user defined variable in scope * test: add test cases for env_replacer * chore: code style * release: @umijs/mako@0.8.11 * chore: bundler-mako@0.8.11 * docs: add changelog for v0.8.11 * fix(tree-shaking): detect export var side effects (#1579) * test: ✅ add a failure test * fix: 🐛 add is pure detection in export var decl * fix: bad output when chunk_loading_global containing quotation mark (#1582) * chore: ➕ add a subdot cli tool script (#1585) * fix(win): copy don't work under windows (#1587) * fix(win): module id should be win_pathed (#1588) * feat(tree-shaking): optimize import namespace used all exports to partial used of source modules (#1584) * test: ✅ add failure test case * feat: ✨ add collect prop explicit field * feat: ✨ collect explicit member prop access to optizmize used export in dep module replace USE ALL export to partial used exports * fix: dedestructuring before collect ExplicitProps * test: ✅ add back trace env var * test: ✅ update test case * fix: 🐛 add globals and helpers --------- Co-authored-by: Jinbao1001 <nodewebli@gmail.com> * fix: merge mako config (#1578) * fix: merge mako config * fix: merge mako config * fix:clear deps should not panic when module not found (#1581) * fix:clear deps should not panic when module not found * chore: use tracing warn * fix: delete log * Revert "fix: merge mako config (#1578)" (#1589) This reverts commit c08821d. * fix: watch too many file error (#1550) * fix: watch too many file error * chore: delete print * chore: delete log * release: @umijs/mako@0.8.8-rc.1 * fix: conflict * feat: support numeric module Id (#1561) * feat: moduleIdStrategy support numberous * fix: typos * fix: typos * fix: change name * fix: typos * release: @umijs/mako@0.8.12 * chore: fix typo and doc (#1591) * fix: chunk_loading_global (#1590) * fix: bad entry output when chunk_loading_global containing singe quote * test: add test cases for chunk_loading_global * docs: update * chore: update lock * chore: remove useless dependencies (#1595) * refactor: 🔥 rm ci warn logs (#1596) * fix: devServer put static serve proxy after umi proxy middleware (#1558) * fix: fix umi load html file failed, * test: add umi devServer test case * fix: typo * fix: hmr on hyper-static-file error * fix: import expect.mjs error on github workflow. * fix: import expect.mjs error on github workflow. * fix: 🐛 expect for error case * fix: 🐛 dev.hmr dont stop * fix: 🐛 add OKAM env * fix: 🐛 wait for mako server * fix: 🐛 kill by children process * test: ✅ add umi.css * refactor: 🎨 unify expect file * feat: export killMakoDevServer from test-hmr.mjs, make it public for all test case * test: ✅ unify expect file * chore: ➕ use express-http-proxy for static proxy * feat: ✨ better mako static proxy * test: ✅ support umi dev test with local mako * chore: ⬆️ update pnpm-lock * chore: 🎨 * fix: 🐛 ignore children process killed error --------- Co-authored-by: huanyu.why <huanyu.why@antgroup.com> Co-authored-by: pshu <pishu.spf@antfin.com> * fix(tree-shaking): object spread transform should go before deconstructing (#1598) * fix: 🐛 deconstructing needs object spread transform first * test: ✅ add guardian syntax * release: @umijs/mako@0.8.13-canary.20240918.1 * chore: bundler-mako@0.8.13-canary.20240918.1 * chore: 🎨 thread name after mako (#1601) * refactor: 🎨 rayon is not friendly to js users * chore: ✏️ rename tokio worker with mako * revert: import namespace optimize (#1606) * Revert "fix(tree-shaking): object spread transform should go before deconstructing (#1598)" This reverts commit 9434d99. * Revert "feat(tree-shaking): optimize import namespace used all exports to partial used of source modules (#1584)" This reverts commit 81a52f8. * chore: 🔧 update mako clean script * release: @umijs/mako@0.8.13 * chore: bundler-mako@0.8.13 * docs: change log 0923 (#1607) * docs: 📝 change log * docs: 📝 change log 0923 * chore: ✏️ * fix: 🐛 turn off express-http-proxy's keep alive (#1612) * fix: 🐛 turn off express-http-proxy's keep alive * refactor: 🔥 remove timeout config * release: @umijs/mako@0.8.14 * chore: bundler-mako@0.8.14 * refactor: napi threadsafe function (#1608) * refactor: napi threadsafe function * chore: update binding typings * refactor: code pieces * fix: catch napi tsfn promise rejection * chore: update binding typings * docs: 📝 change log 20240925 (#1613) * feat: disable webp to base64 (#1602) * feat: init * fix: context * fix: no use * fix: typos * fix: typos * fix: typos * fix: typos * fix(bundler-mako): experimental config should be merged deeply (#1617) * refactor: config codes organization (#1618) * refactor: config codes organization * fix: typos * refactor: config parse error * fix: clickToComponent don't work (#1620) * fix: duplicate_package_checker panic when no package.json is supplied (#1621) * fix: file_stem index out of bound (#1623) * feat: add resolve_id plugin hook (#1625) * feat: add resolve_id plugin hook * chore: update docs * feat: add external * release: @umijs/mako@0.8.15 * chore: bundler-mako@0.8.15 * docs: changelog for 0.8.15 * chore: update the release instruction (#1627) * refactor: code-splitting config (#1629) * feat: add loadInclude plugin hook (#1630) * feat: add { isEntry } for resolve_id plugin hook (#1631) * feat/upgrade swc (#1444) * 🚧 * 🚧 a basic working version * chore: 🚨 lint happy * refactor: 🎨 adjust to new swc * refactor: 🎨 remove deprecated methods * chore: 🚨 lint happy * feat: ✨ update swc emotion * chore: 🔧 remove useless profile in sub crate * chore: 🔧 add back emotion plugin * refactor: 🎨 add back merge source map * test: ✅ hot update js file served by hyper static, it use text/javascript * chore: 🔧 lock update * chore: 🔧 clean up swc core feature * refactor: 🎨 fix breaking change of ctxt of span * fix: 🐛 ctxt apply mark * refactor: 🎨 use DUMMY CTXT instead of SyntaxContext::empty() * chore: ⬆️ temperal use mdxjs from kdy branch * feat: ✨ re-enable mdxjs * feat: ✨ swc_core 0.100.1 * chore: 🙈 ignore fmt in fixtures * chore: 🚨 lint happy * chore: ⬆️ swc_common * chore: ✏️ typo * release: @umijs/mako@0.8.1-canary.20240812.1 * chore: bundler-mako@0.8.1-canary.20240812.1 * chore: ⬆️ swc_core 0.100.6 * release: @umijs/mako@0.8.1-canary.20240814.2 * chore: bundler-mako@0.8.1-canary.20240814.2 * chore: 🚨 lint happy * chore: 🔧 CI build bindings * chore: 🔧 fix build docker * refactor: 🔥 remove aarch64-unknown-linux-gnu * chore: 🔧 create tar * chore: 🙈 * release: @umijs/mako@0.8.3-canary.20240820.1 * chore: bundler-mako@0.8.3-canary.20240820.1 * chore: 🔧 wrong donwload param * chore: 🔧 upload download actions should be same version * chore: 🔧 try codecov in ci * refactor: 🔥 remove unnecessary target * refactor: 🎨 use swc comments * fix: 🐛 after upgrade to swc_core it should remove paren before minifiy * refactor: 🎨 move dummy ctxt defintion to ast mod * chore: 🚨 lint happy * release: @umijs/mako@0.8.8-canary.20240902.1 * chore: bundler-mako@0.8.8-canary.20240902.1 * release: @umijs/mako@0.8.8-canary.20240903.3 * chore: bundler-mako@0.8.8-canary.20240903.3 * refactor: 🎨 use VisitMut + Fold code style * chore: ⬆️ update pnpm-lock * chore: 🙈 * revert: ⏪ delete musl bindin * release: @umijs/mako@0.8.9-canary.20240909.1 * chore: bundler-mako@0.8.9-canary.20240909.1 * release: @umijs/mako@0.8.11-canary.20240910.1 * chore: bundler-mako@0.8.11-canary.20240910.1 * fix: 🐛 use chars() instead of bytes() * fix: 🐛 unescape html entity by html escape crate * release: @umijs/mako@0.8.14-canary.20240924.1 * chore: bundler-mako@0.8.14-canary.20240924.1 * release: @umijs/mako@0.8.15-canary.20240927.1 * chore: bundler-mako@0.8.15-canary.20240927.1 * fix: hash not stable (&revert import * as optimize) (#1610) * Revert "revert: import namespace optimize (#1606)" This reverts commit a485358. * fix: hash not stable * fix: deps sort not stable * fix: deps sort not stable * fix: deps sort not stable * fix: delete binding * fix: var name * chore: iter to into * fix: format * release: @umijs/mako@0.9.0 * chore: bundler-mako@0.9.0 * docs: 📝 changelog 0.9.0 * fix: duplicate_package_checker panic when package.json has no version field (#1634) * feat: magic comment chunk name (#1628) * refactor: code-splitting config * feat: support magic comment chunk name basically * fix: magic comment chunk name for webworker * refactor: use ImportOptions to represent option from magic comments * fix: dep replacer when magic comments chunk name existed * test: update test cases for magic comments chunk name * fix: dep replacer when dynamic import depencies is missing * chore: remove useless codes * refactor: code styles * docs: add todo for ChunkId * test: fix visitors::dynamic_import::tests::test_dynamic_import * test: fix test::hmr * fix: dep replacer when dynamic import css modules or moduleIdStrategy is hashed * chore: remove meaning less changes * test: enable magic comment chunk name in fixtures/umi * docs: add docs for magic comment chunk name * feat: support webpackIgnore and makoIgnore magic comment (#1636) * feat: support webpackIgnore and makoIgnore magic comment * chore: fmt * chore: rename magic_comment_chunk_name to magic_comment * chore: fix typo * feat: add transform plugin hook (#1637) * feat: add transform plugin hook * docs: add docs * chore: fmt * chore: perf * feat: add transformInclude plugin hook (#1639) * feat: add transformInclude plugin hook * chore: fmt * Fix: import namespace optimize panic with nested for of stmt (#1640) * test: ✅ add import namespace optimize panic test case * fix: 🐛 fix nested for of stmt panic * release: @umijs/mako@0.9.2-canary.20241016.1 * chore: bundler-mako@0.9.2-canary.20241016.1 * release: @umijs/mako@0.9.2 * chore: bundler-mako@0.9.2 * docs: 📝 changelog 0.9.2 * feat: add buildEnd plugin hook (#1644) * feat: add enforce plugin hook (#1646) * feat: add enforce plugin hook * chore: code style * chore: code style * chore: fix lint * chore: 🎨 add missing binding type * release: @umijs/mako@0.9.3-canary.20241016.1 * chore: bundler-mako@0.9.3-canary.20241016.1 * feat: add writeBundle plugin hook (#1650) * feat: add watch_changes plugin hook (#1651) * feat: add watch_changes plugin hook * chore: fix lint * chore: fix ts define * fix: mako on windows don't work (#1652) * fix: devtool sourcemap explosion in windows (#1653) * chore: remove dead code * fix: should not re-group when span changed (#1654) * fix: umd should be import as cjs (#1642) * fix: umd should be import as cjs * refactor: 🎨 just short circuit typeof define to prevent define takes effect * revert: ⏪ binding.d.ts --------- Co-authored-by: pshu <pishu.spf@antfin.com> * fix: 🐛 add process.env.SOCKET_SERVER define to prevent process polyfilll (#1655) * release: @umijs/mako@0.9.3-canary.20241023.1 * chore: bundler-mako@0.9.3-canary.20241023.1 * release: @umijs/mako@0.9.3 * chore: bundler-mako@0.9.3 * docs: changelog for 0.9.3 * fix: hmr with magic comment chunk name (#1663) * feat: enable magicComment features by default (#1667) * feat(bundler-mako): add moduleIdStrategy to supportMakoConfigKeys (#1664) * fix: async module in circular dependence (#1659) * test: ✅ add test async module in circular dependencies * refactor: 🎨 handle async polution by traversal * refactor: 🎨 use default over expect * feat: compatible codeSplitting config with umi (#1669) * feat: compatible codeSplitting config with umi * test: fix e2e code-splitting.granular * fix: umi codeSplitting: depPerChunk * Feat/benchmark workflows (#1671) * feat: benchmark-workflows * fix: 修改Github Secrets * release: @umijs/mako@0.9.4 * chore: bundler-mako@0.9.4 * docs: 📝 changelog 0.9.4 * chore: Optional parameters (#1679) * chore: Optional parameters * Update index.ts * fix: skip module should skip async module (#1662) * release: @umijs/mako@0.9.5 * chore: bundler-mako@0.9.5 * docs: update changelog * docs: update changelog * feat(ssu): handle dependence changing while watching (#1690) * refactor: 🎨 add after update aspect for rebuild cached modules * refactor: 🎨 add next_build aspect in build_my_modify * feat: ✨ 区分 ssu firstbuild 和 updating 两者状态 * fix: pnpm workspace watch too many files (#1684) * fix: ✅ ts annotated declare variable treat as top level variable (#1682) * test: ✅ add ts declare annotated variable as top level * refactor: 🎨 mv clean syntax context to visitors folder * fix: 🐛 strip ts/tsx first, then do normal transform * feat: move ensure runtime to entry (#1660) * feat: ✨ add ensure2 replace in dynamic replace * feat: ✨ ensure 2 runtime * feat: ✨ add experimental centralEnsure config * refactor: 🎨 add struct ReslvedReplaceInfo * feat: ✨ add central ensure plugin * refactor: 🎨 extract module ensure map * refactor: 🎨 add back chunk id in replace info * refactor: 🎨 fix case one source with different import type * refactor: 🎨 extract hmr runtime update code aspect * release: @umijs/mako@0.9.6-canary.20241107.1 * chore: bundler-mako@0.9.6-canary.20241107.1 * feat: keep unresolved nodejs require (#1689) * fix: regexpr for nodejs intenal modules igonre * feat: not replace unresolved nodejs require to __mako_require__ * fix: define util require should be __mako_require__ * feat: add expreriental.keep_unresolved_node_require * feat: add expreriental.ignore_non_literal_require * chore: 🔥 remove unused fn * release: @umijs/mako@0.9.6 * chore: bundler-mako@0.9.6 * docs: changelog for 0.9.6 * fix(SSU): 🐛 in case external not avaible to all entries (#1698) * fix(SSU): 🐛 in case external not avaible to all entries * refactor: 🎨 explict ignore the error * fix: devserver response header add cacheControl no-cache (#1692) * fix: add no-cache * feat: add cross origin * fix: resonse header add cors and no_cache for all branch (#1699) * fix: judge devServer instead of writeToDisk * fix: add branch header * refactor: 🎨 static file with 0 ages --------- Co-authored-by: pshu <pishu.spf@antfin.com> * release: @umijs/mako@0.9.7 * chore: bundler-mako@0.9.7 * docs: 📝 update changelog for 0.9.7 * chore: ✏️ remove some if (#1706) * fix: optimization.concatenateModules dts lost (#1708) * refactor: 🔥 enter ensure 使用 chunk sync dep 减少首屏 chunk 数量 (#1707) * fix: 🐛 typing of stats (#1712) * fix: 🐛 detect circular deps output file content (#1715) * chore: update @umijs/mako typings * feat: ensure esm imports exists when mode is production (#1709) * feat: ensure esm imports exists when mode is production * release: @umijs/mako@0.9.8 * chore: bundler-mako@0.9.8 * docs: update docs * fix: node ignores (#1716) * feat: supports publicPath: auto (#1717) * feat: auto resolve entry file extension (#1718) * feat: auto resolve entry file extension * fix: remove useless clone * Fix/context module source with first empty quasis (#1719) * test: ✅ add first empty quasis template string module source case * fix: 🐛 first emtpy quasis case * fix: inline css config deserialize (#1720) * fix: node ignore should support node: prefixed only built-in modules (#1721) * release: @umijs/mako@0.9.9 * docs: suggest using volta to manage node and pnpm's version * chore: bundler-mako@0.9.9 * docs: update CHANGELOG.md * feat: supports umd export (#1723) * feat: supports umd export * fix: umd config binding typing * fix: typos * fix: umd export * chore: update typings * fix: replace the "typeof __webpack_require__" content (#1688) * fix: replace the "typeof __webpack_require__" content * fix: add some other webpack string name * fix: 增加对typeof 表达式的处理 * fix: delete log * fix: rename --------- Co-authored-by: shikuan.sk <shikuan.sk@antgroup.com> * fix: umd config deserialization (#1726) * feat: support case sensitive (#1714) * feat: add CaseSensitivePlugin * FIX: update path check * fix: clippy error * fix: 调整判断 * fix: 修复目录读取 * fix: 修改参数名称 * fix: 调整测试方式添加e2e断言,并增加配置项只有mac系统下才需要开启相关配置 * fix: 删除过滤条件 * fix: 删除多余测试文件,增加更新内容 * fix: 删除多余log * fix: 测试执行 * fix: 添加测试系统 * fix: 调整顺序 * fix: 添加测试系统 * fix: 非mac环境断言 * fix: 引用遗漏 * fix: 断言 * fix: 删除默认 * fix: 默认配置 * fix: 测试覆盖 * Revert "fix: 测试覆盖" This reverts commit b0a2e66. --------- Co-authored-by: shikuan.sk <shikuan.sk@antgroup.com> * refactor: 🔥 remove unecessary transform (#1727) * feat: output filename (#1725) * refactor: 🎨 add file name template and chunk name in ChunkFile struct * feat: ✨ add config to output#filename * feat: ✨ render filename when output#filename configed * feat: ✨ calc hash in ast impl for entry * test: ✅ add test case * test: ✅ add ut * chore: 🔧 disable codecov error * refactor: 🎨 remove clone * fix: 🐛 hash when necessary * chore: 🔧 add codecov.yml * release: @umijs/mako@0.9.10-canary.20241218.1 * chore: ⬆️ update pnpm-lock * feat: native plugin init (#1691) * feat: init rust plugin * chore: delete print * Rename cargo.toml to Cargo.toml * chore: update * fix: type * fix: plugin options string * fix: cfg test * release: @umijs/mako@0.10.0 * chore: bundler-mako@0.10.0 * docs: 📝 changelog 2024.12.20 * chore: 🔧 for quick setup dep to debug (#1733) * fix: support optional chaining in environment variable (#1730) * fix: support optional chaining in environment variable * test(): add edge cases for optional chaining in env_replacer * refactor: 🎨 no need to resolve empty url in css (#1732) * refactor: 🎨 no need to resolve empty url in css * refactor: 🎨 add test case * feat: support unplugin context (#1728) * feat: support plugin context * fix: napi context * chore: revert changes * chore: improve * feat: add error * feat: warn and error support object * feat: support emit_file * ci: fix test * chore: improve * chore: update test * chore: format * chore: don't support add watch file * feat: load and transform adapter, and add unplugin-replace example * chore: test unplugin-icons * chore: update pnpm-lock.yaml * docs: improve --------- Co-authored-by: xusd320 <xusd320@gmail.com> * fix: legacy octal escape is not permitted in strict mode (#1736) * fix: legacy octal escape is not permitted in strict mode * fix: e2e inline css * release: @umijs/mako@0.11.0 * chore: bundler-mako@0.11.0 * fix: pnpm lock * docs: 📝 changelog 2024.12.26 * Revert "feat: support unplugin context (#1728)" (#1737) This reverts commit 3dd6d9d. * release: @umijs/mako@0.11.1 * chore: bundler-mako@0.11.1 * feat: support unplugin context (#1741) * feat: support plugin context * fix: napi context * chore: revert changes * chore: improve * feat: add error * feat: warn and error support object * feat: support emit_file * ci: fix test * chore: improve * chore: update test * chore: format * chore: don't support add watch file * feat: load and transform adapter, and add unplugin-replace example * chore: test unplugin-icons * chore: update pnpm-lock.yaml * docs: improve --------- Co-authored-by: xusd320 <xusd320@gmail.com> * fix: #1007 (#1738) support BinaryExpression Co-authored-by: shikuan.sk <shikuan.sk@antgroup.com> * fix: win path problem with context module and require context (#1742) * chore(mako): add debug notice for local builds (#1743) * fix: normalize Windows paths in ModuleId constructors (#1744) * fix: normalize Windows paths in Compiler output path handling (#1745) * fix: typos * release: @umijs/mako@0.11.2 * chore: bundler-mako@0.11.2 * docs: update CHANGELOG.md * feat(create-mako): refactor create-mako (#1751) * chore: add issue and pull request templates for better contribution guidelines (#1753) * fix: ensure parent directories are created when writing to disk in MemoryChunkFileCache (#1755) * chore: release @umijs/tools * release: @umijs/mako@0.11.3 * chore: update the release introduction * ci: fix ci (#1758) * chore: upgrade @umijs/tools and do github release and changelog generate and translation by script * docs: changelog for 0.11.3 * chore: add check-ecosystem-usages script (#1759) * fix: analyze don't work in safari (#1761) * fix(mako): cli delay exit (#1762) * dep: @umijs/tools@0.1.23 * fix: load wasm (#1705) * fix: 修复load .wasm文件对importObject的处理 * fix: 删除没必要的输出 * fix: 修改生成的成员表达式js代码 * fix: 变量重命名 * fix: 修复代码lint报错 * test: 补充wasm_runtime测试用例 * chore: 补充import js方式的示例 * chore: 修改import js示例wasm产物格式 * chore: wasmparser依赖包在配置文件的位置 * chore: 删除多余的.wasm load逻辑 --------- Co-authored-by: xusd320 <xusd320@gmail.com> * fix: chunk groups' order when building mpa (#1763) * feat(copy): support advanced copy configuration with custom target paths (#1711) * feat(copy): support advanced copy configuration with custom target paths - Add CopyConfig enum to support both basic and advanced copy modes - Basic mode: maintains backward compatibility with string[] format - Advanced mode: supports {from: string, to: string} format for custom paths - Update copy plugin to handle both configuration formats - Ensure target directories are created automatically Example config: { 'copy': [ 'public', // basic mode { 'from': 'assets', 'to': 'static' } // advanced mode ] } * fix(copy): prevent path traversal in copy plugin Add path canonicalization and validation to ensure target paths remain within the destination directory * chore: Update `copy` config type in Mako bundler - Updated the type of the `copy` property in the `BuildParams` interface to support both `string` and `{ from: string; to: string }`. - Ensured the `copy` configuration is properly validated to handle both types. * docs: Update `copy` config type in documentation - Updated the `copy` property type in the configuration documentation to reflect the change from `string[]` to `(string | { from: string; to: string })[]`. - Clarified that the `copy` configuration can now accept both strings and objects with `from` and `to` properties. * test(copy): add e2e tests for copy plugin from/to pattern - Update config.copy test fixtures to cover from/to pattern - Add assertions for copied files in new location - Adjust copy plugin path validation * fix(copy): improve path validation and cleanup for copy plugin - Add directory cleanup when path validation fails - Use canonicalized paths for more reliable path validation - Add concatenateModules option type to BuildParams * fix: ci (#1768) * release: @umijs/mako@0.11.4 * chore: bump version * docs: 📝 changelog 2025.02.12 * chore: update changelog 2025.02.12 * fix: plugin context gc (#1769) * fix: mako已经支持了scss 但是没有支持module.scss文件 (#1770) Co-authored-by: shikuan.sk <shikuan.sk@antgroup.com> * feat: add module federation plugin (#1764) * feat: support module federation * feat: mf exposes to remote entries * chore: code styles * feat: mf container entry impl * fix: mf container entry * fix: mf runtime initOptions * feat: add containter references * feat: impl mf remote * feat: improve mf exposes * fix: mf exposes runtime factory * fix: mf plugin execution order * chore: update mf demo * feat: generate mf manifest in rust * fix: remote stats.json * refactor: code styles * chore: add some FIXME * refactor: mf plugin mods files * refactor: mf plugin mods files * chore: remove dead code * --wip-- [skip ci] * fix: remote stats.json * fix: typos * chore: simpify mf runtime codes fmt * refactor: mf containter plugin * feat: mf shared workaround * feat: mf shared workaround * fix: runtime template and remove some useless codes * fix: mf dev server * fix: mf shared config * feat: supports chunk group exclude * feat: mf patch code splitting * feat: mf shared manifest * feat: add config hash for mf shared module * chore: update mako typings * chore: code styles * chore: fix typo * chore: code styles * perf: improve performance * chore: code styles * chore: rename types * feat: add options to disable mf manifest * feat: entry config should be defined as BTreeMap * fix: mf shared consume and supports eager config * fix: mf shared eager * fix: not generate chunk for mf remote module * fix: typos * feat: add entry filename supports * chore: remove meaning less changes * fix: entry filename and mf config * release: @umijs/mako@0.11.4-canary.20250206.0 * fix: ignore shared dep when it is been external * Revert "release: @umijs/mako@0.11.4-canary.20250206.0" This reverts commit d3105d9. * release: @umijs/mako@0.11.4-canary.20250207.0 * fix: skip serialize mf manifest remoteEntry if none * fix: mf manifest remoteEntry address * Revert "release: @umijs/mako@0.11.4-canary.20250207.0" This reverts commit 6179982. * fix: typo * fix: mako mf manifest publicPath * fix: mf manifest panic * fix: mf typings * test: add e2e test for mf * fix: typo * chore: update README * fix: update mf bingding typings * fix: typings * fix: should not generate mf remotes runtime when remotes is empty * chore: remote wrong comment * feat: add chunk matcher for mf * fix: mf binding typings * chore: remove debug print statements * docs: update moduleFederation configuration docs * fix: mf config docs * chore: update CONTRIBUTING.md * release: @umijs/mako@0.11.5 * chore: update CHANGELOG.md and versions * feat: support to disable camel2DashComponentName of transformImport (#1773) * feat: support to disable camel2DashComponentName of transformImport * fix: typings * fix: 修复sass/less-loader的路径解析 (#1771) * fix: 支持webpack中sass-loader的路径解析 * chore: 调整目录 * chore: 移除注释等 * chore: 引入loader-runner * chore: sass-loader * chore: 修改loader返回空值处理 * test: 设置loader resolver的别名 * chore: update lock * fix: loader options * refactor: 提取插件代码 * fix: getResolve * fix: 修复runLoaders中的错误处理逻辑 * release: @umijs/mako@0.11.6 * fix: pnpm-lock * chore: update changelog for v0.11.6 * chore: update changelog for v0.11.6 * chore: update changelog for v0.11.6 * fix: watch less and sass dependencies (#1779) * chore: stash * chore: stash * feat: LessModuleGraph * feat: less-import-plugin * chore: 删除多余代码 * fix: 兼容url() * chore: plugin * feat: add beforeRebuild hook * ci: clippy format * fix: paths去重 * fix: rename _path * chore: rust层增加临时过滤文件方式 * chore: 提取createParallelLoader * refactor: before_rebuild hook (#1785) * refactor: before_rebuild hook -n * fix: typos * feat: postcss-loader (#1787) * feat: 支持postcss-loader * chore: 合并postcss到options传给render * chore: 更新.gitignore以排除less.postcss的node_modules目录 * feat: 添加PostCSS插件支持并更新相关类型定义 * refactor: 简化Less和Sass插件中的选项传递 * docs: 添加postcss支持的配置说明 * feat: 添加对PostCSS的支持,更新相关插件以集成postLoaders * feat: 更新Less和Sass插件以移除postLoaders,增强PostCSS支持 * test: 补充postcss测试用例 * fix: use transpiled hmr runtime (#1813) * fix: use transpiled hmr runtime (#1814) * release: @umijs/mako@0.11.7 * fix: package-lock.json * fix: use transpiled hmr runtime entry (#1815) * fix: disable parallel sassLoader because sassOptions.function cann't be shared cross workers (#1816) * release: @umijs/mako@0.11.8 * fix: package-lock.json * fix: package-lock.json * fix: typos * chore: update changelog for v0.11.8 * fix: less,sass,postcss loader panic (#1818) * release: @umijs/mako@0.11.9 * fix: package-lock.json * chore: update changelog for v0.11.9 * fix: worker threads panic on linux (#1823) * release: @umijs/mako@0.11.10 * fix: package-lock.json * chore: update changelog for v0.11.10 * fix: dev支持inline-source-map (#1859) Co-authored-by: dongqing.mdq <dongqing.mdq@antgroup.com> * release: @umijs/mako@0.11.11 * fix: package-lock.json * chore: update changelog for v0.11.11 * Update PULL_REQUEST_TEMPLATE.md * Update PULL_REQUEST_TEMPLATE.md * fix: less resolve alias (#1906) * docs: update README.md (#1907) * Update README.md * Apply suggestions from code review Co-authored-by: Peach <scdzwyxst@gmail.com> * Update README.md * Update README.md --------- Co-authored-by: Peach <scdzwyxst@gmail.com> * Update README.md * Update README.md * release: @umijs/mako@0.11.12 * feat: update pnpm log * chore: update changelog for v0.11.12 * fix: panic on docker linux (#1909) * doc: add openomy (#1910) * release: @umijs/mako@0.11.13 * chore: update changelog for v0.11.13 * chore: remove codecov * chore: update examples/multiple-entries-heavy * feat: support inline-source-map devtool option (#1965) Co-authored-by: hanzebang.hzb <hanzebang.hzb@antgroup.com> * chore: truncate old codes --------- Co-authored-by: pshu <pishu.spf@antfin.com> Co-authored-by: chencheng (云谦) <sorrycc@gmail.com> Co-authored-by: Jinbao1001 <nodewebli@gmail.com> Co-authored-by: money <hualigushi@163.com> Co-authored-by: eisonhower <why490078184@gmail.com> Co-authored-by: huanyu.why <huanyu.why@antgroup.com> Co-authored-by: PeachScript <scdzwyxst@gmail.com> Co-authored-by: Wu-kung <1434246346@qq.com> Co-authored-by: 聪小陈 <xiaohuoni@users.noreply.github.com> Co-authored-by: akitaSummer <akitasummer@outlook.com> Co-authored-by: Shi Kuan <shikuan1992@gmail.com> Co-authored-by: shikuan.sk <shikuan.sk@antgroup.com> Co-authored-by: yezao <75713784+yezaoshu@users.noreply.github.com> Co-authored-by: 御风 <18012261618@126.com> Co-authored-by: bqxbqx <132878537+BQXBQX@users.noreply.github.com> Co-authored-by: miaodongqing <dongqing_miao@163.com> Co-authored-by: dongqing.mdq <dongqing.mdq@antgroup.com> Co-authored-by: kiner-tang(星河) <1127031143@qq.com> Co-authored-by: hanzebang <46307343+hanzebang@users.noreply.github.com> Co-authored-by: hanzebang.hzb <hanzebang.hzb@antgroup.com>
Close #1710
Close #164
【支持大小写检测】
Summary by CodeRabbit
新功能
CaseSensitivePlugin,用于处理文件名的大小写敏感性。caseSensitiveCheck,默认值为true,用于控制大小写检查的启用。case_sensitive,扩展了插件架构。文档
caseSensitiveCheck配置项的说明。caseSensitiveCheck配置项的说明。测试
持续集成