Add support for theme-next.css CSS variable validation#33
Merged
Conversation
Implements detection of SaltProviderNext usage and includes CSS variables from theme-next.css when validating, preventing false errors for variables defined in the newer theme configuration. - Add --themeNextCss CLI option to customize theme-next.css path - Detect SaltProviderNext imports in source files - Load and merge CSS variables from both index.css and theme-next.css - Works in both combined mode and CSS-only mode Fixes #25
- Create detectSaltProviderNext() helper function to eliminate code duplication - Remove redundant console.log (verbose logging already happens in the helper) - Reduce code from ~75 lines to ~30 lines with better maintainability
- Move detectSaltProviderNext function from index.js to migration/utils.js - Add comprehensive unit tests covering all scenarios: - Detection from @salt-ds/core and @salt-ds/lab - Negative cases (no imports, wrong package, etc.) - Multiple files scenario - Empty source files array - All 60 tests passing (added 7 new tests)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Implements detection of SaltProviderNext usage and includes CSS variables
from theme-next.css when validating, preventing false errors for variables
defined in the newer theme configuration.
Fixes #25