Last 12 weeks · 3 commits
4 of 6 standards met
Summary This fixes handling for Windows reserved device names followed by extensions. Windows treats reserved device names like as reserved even when followed by an extension, such as or . Previously, those names were returned unchanged. This change detects reserved device names before the first and inserts the replacement before the extension. Updates: handles extension-bearing Windows reserved device names by applying the replacement to the reserved base name before the extension. updates / expectations and adds regression coverage for , , and . Behavior change: extension-bearing Windows reserved device names now receive the replacement before the extension. Test plan [x] passes. [x] New regression tests cover Windows reserved names with extensions. [ ] CI rollup checked after open. Notes for maintainers Open to a different output shape if you prefer the replacement after the full filename instead of before the extension.
Repository: sindresorhus/filenamify. Description: Convert a string to a valid safe filename Stars: 524, Forks: 29. Primary language: JavaScript. Languages: JavaScript (100%). License: MIT. Latest release: v7.0.2 (2mo ago). Open PRs: 1, open issues: 1. Last activity: 1mo ago. Community health: 85%. Top contributors: sindresorhus, tomasklaen, BendingBender, Richienb, orsett0, MiAmigaAiva, daveseco7, Gares95, marcelgerber, miraclx and others.