-
-
Notifications
You must be signed in to change notification settings - Fork 78
Comparing changes
Open a pull request
base repository: jsdom/cssstyle
base: v5.3.5
head repository: jsdom/cssstyle
compare: v5.3.6
- 16 commits
- 88 files changed
- 2 contributors
Commits on Dec 17, 2025
-
* Expand the "description" field. * Update "repository" to the modern format, per complaints from the npm CLI. * Remove "homepage" and "bugs", as they can be inferred from "repository". * Remove "maintainers", as that is set by npm automatically. * Remove "contributors", as it was outdated and that data is better tracked on GitHub anyway. * Remove "directories", since an entry for the "lib" directory does nothing. * Remove the .npmignore file, since it's redundant with the package.json "files" field.
Configuration menu - View commit details
-
Copy full SHA for 3c7ea59 - Browse repository at this point
Copy the full SHA 3c7ea59View commit details
Commits on Dec 27, 2025
-
Configuration menu - View commit details
-
Copy full SHA for 05ebb2c - Browse repository at this point
Copy the full SHA 05ebb2cView commit details -
Refactor exports to use module.exports object
Replaces individual exports assignments with local function declarations and a single module.exports object at the end of the file. This improves code clarity and maintainability by consolidating all exports in one place.
Configuration menu - View commit details
-
Copy full SHA for 78b13dc - Browse repository at this point
Copy the full SHA 78b13dcView commit details -
Add JSDoc comments to parser utility functions
Added detailed JSDoc comments to all major functions in lib/parsers.js to improve code readability and provide better context for parameters and return values. This enhances maintainability and developer experience by clarifying function purposes and usage.
Configuration menu - View commit details
-
Copy full SHA for 3b32b0d - Browse repository at this point
Copy the full SHA 3b32b0dView commit details -
Refactor keyword and color lists to use Set
Replaces arrays for global CSS keywords and system colors with Set objects for improved lookup performance. Updates all relevant checks from .includes() to .has().
Configuration menu - View commit details
-
Copy full SHA for 0bff5e4 - Browse repository at this point
Copy the full SHA 0bff5e4View commit details -
Refactor AST node type checks to use constants
Introduces an AST_TYPES constant object to centralize AST node type strings and replaces hardcoded type string comparisons throughout the file with references to AST_TYPES. This improves maintainability and reduces the risk of typos or inconsistencies in type checks.
Configuration menu - View commit details
-
Copy full SHA for b04beb1 - Browse repository at this point
Copy the full SHA b04beb1View commit details -
Refactor property value parsing for clarity
Simplified the extraction of itemValue by replacing regex-based string replacement with a more direct slice operation. This improves readability and maintains the same functionality.
Configuration menu - View commit details
-
Copy full SHA for 11e004a - Browse repository at this point
Copy the full SHA 11e004aView commit details -
Refactor numeric value parsing logic
Introduces a shared parseNumericValue helper to unify and simplify parsing of numbers, lengths, percentages, and angles. This reduces code duplication and improves maintainability across parseNumber, parseLength, parsePercentage, parseLengthPercentage, and parseAngle.
Configuration menu - View commit details
-
Copy full SHA for b6a4e5f - Browse repository at this point
Copy the full SHA b6a4e5fView commit details -
Refactor calc name assignment in parsePropertyValue
Replaces hardcoded 'calc' string with the variable 'name' when assigning the 'name' property in parsedValues. This improves code maintainability and consistency for function parsing.
Configuration menu - View commit details
-
Copy full SHA for 0a71683 - Browse repository at this point
Copy the full SHA 0a71683View commit details
Commits on Dec 31, 2025
-
Refactor to prepare for addressing shorthand property issues
Introduce a mechanism to auto-generate CSS property definitions in propertyDefinitions.js, and refactor the codebase to use these generated definitions. This will be used eventually in jsdom to replace propertiesWithResolvedValueImplemented in jsdom's lib/jsdom/living/helpers/style-rules.js, allowing jsdom to delegate property metadata management entirely to cssstyle. Refactor normalize.js into smaller functions with clearer roles. Replace string literals with constants where possible. This work is mostly preparatory, but it does fix web-platform-tests/to-upstream/css/cssom/style-border-shorthand-var.html. Follow-up work will implement the complex logic for expanding shorthands into longhands.
Configuration menu - View commit details
-
Copy full SHA for a3413ab - Browse repository at this point
Copy the full SHA a3413abView commit details -
Add property name exports to property modules
Each property module now exports its property name as `module.exports.property`. This change enables more consistent and DRY usage of property names throughout the codebase, especially for shorthand and initial value maps, reducing hardcoded strings and potential typos.
Configuration menu - View commit details
-
Copy full SHA for e337088 - Browse repository at this point
Copy the full SHA e337088View commit details -
Refactor priority calculation for property setters
Simplifies and unifies the logic for determining the priority argument in property setters across background, border, flex, font, margin, and padding property modules. The new approach uses a single conditional to check shorthand and property priorities, improving code clarity and maintainability.
Configuration menu - View commit details
-
Copy full SHA for 3705035 - Browse repository at this point
Copy the full SHA 3705035View commit details -
Configuration menu - View commit details
-
Copy full SHA for c06fbab - Browse repository at this point
Copy the full SHA c06fbabView commit details -
Improve getPropertyDescriptor() fallback code
getPropertyDescriptor() is used for the generic getters and setters that do not have implementations in properties/*.js. Change from just parsing CSS and setting it as-is, to handle properties more correctly by using the AST types.
Configuration menu - View commit details
-
Copy full SHA for dcfbbaf - Browse repository at this point
Copy the full SHA dcfbbafView commit details -
Add LRU cache for CSS parsing and validation
Should help with jsdom/jsdom#3985.
Configuration menu - View commit details
-
Copy full SHA for 2818a50 - Browse repository at this point
Copy the full SHA 2818a50View commit details -
Configuration menu - View commit details
-
Copy full SHA for 35dbfe7 - Browse repository at this point
Copy the full SHA 35dbfe7View commit details
This comparison is taking too long to generate.
Unfortunately it looks like we can’t render this comparison for you right now. It might be too big, or there might be something weird with your repository.
You can try running this command locally to see the comparison on your machine:
git diff v5.3.5...v5.3.6