Skip to content

Dev patches - #319

Merged
XhmikosR merged 15 commits into
mainfrom
xmr/dev
May 6, 2026
Merged

Dev patches#319
XhmikosR merged 15 commits into
mainfrom
xmr/dev

Conversation

@XhmikosR

@XhmikosR XhmikosR commented May 5, 2026

Copy link
Copy Markdown
Owner

No description provided.

XhmikosR added 7 commits May 3, 2026 08:16
fusvEnabled was module-level state that was never reset between calls.
If a file ended with an active fusv-disable comment and no matching
fusv-enable, every subsequent parse() call in the same process would
start with fusvEnabled=false, silently dropping all variables found
in the files parsed after it.
node.raws.text is undefined for block-style /* fusv-disable */ comments.
node.text is the stable public PostCSS API and works for both inline //
and block /* */ comment nodes.
Use node.type === 'decl' and node.type === 'comment' which is the public PostCSS API.
lstat does not follow symlinks, so passing a symlinked directory path
to findAsync would throw 'Not a valid directory!' even though the path
resolves to a valid directory. stat matches the sync path behavior.
When only one extension is provided, the old code assigned the array
itself (e.g. ['scss']) to options.fileExtensions. This worked because
template literals coerce arrays via .toString(), so `**/*.${['scss']}`
produced `**/*.scss` correctly. Replacing it with extensions[0] makes
the intent explicit and avoids relying on implicit coercion.
The spread pattern was creating a new array on every iteration.
@XhmikosR
XhmikosR force-pushed the xmr/dev branch 2 times, most recently from d279069 to 8e1f962 Compare May 5, 2026 05:45
XhmikosR added 4 commits May 5, 2026 17:41
- Pass a fully-prepared options object to main() directly instead of re-reading program.opts() inside main()
- Return the main() promise from the action callback so commander handles any rejection cleanly
- Drop empty strings from split ignore/ignoreFiles values with filter(Boolean)
- Rename variables
@XhmikosR
XhmikosR force-pushed the xmr/dev branch 6 times, most recently from 0b5b7c2 to dc249d7 Compare May 6, 2026 10:01
XhmikosR added 4 commits May 6, 2026 13:33
- Use named imports from node:fs and node:fs/promises
- Switch arrow functions to named functions
- Extract buildGlobPattern() to deduplicate glob pattern construction
- Simplify sanitizeDir functions by dropping the redundant path.isAbsolute check since path.resolve handles both cases already
- Rename internal identifiers
- Drop assertIsDirectory, validateDirAsync and validateDirSync
The ignore and ignoreFiles options have always been trimmed; fileExtensions
was not. A leading/trailing space produced a glob like **/*. scss  which
matched nothing.
@XhmikosR
XhmikosR force-pushed the xmr/dev branch 2 times, most recently from 2b3f8b9 to 87ac5c9 Compare May 6, 2026 10:39
@XhmikosR
XhmikosR marked this pull request as ready for review May 6, 2026 12:58
@XhmikosR
XhmikosR merged commit fd623c4 into main May 6, 2026
11 checks passed
@XhmikosR
XhmikosR deleted the xmr/dev branch May 6, 2026 12:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant