Changes to CSS Tokenizer
January 14, 2026 ยท View on GitHub
4.0.0
January 14, 2026
- Updated: Support for Node
20.19.0or later (major). - Removed:
commonjsAPI. In supported Node versionsrequire(esm)will work without needing to make code changes.
3.0.4
May 27, 2025
- align serializers with CSSOM
3.0.3
October 25, 2024
- Fix input preprocessing
3.0.2
October 10, 2024
isTokenNumericandisTokenWhiteSpaceOrCommentnow acceptnullandundefinedas input, in parallel with other type predicates.
3.0.1
August 18, 2024
- Updated the return type of
nextToken()to indicate that it always returns a value.
3.0.0
August 3, 2024
- Updated: Support for Node v18+ (major).
- Improve performance.
2.4.1
July 5, 2024
- Remove
astNodethat was erroneously added to theParseErrorbase class.
2.4.0
July 5, 2024
- Expose
ParseErrorMessage, the list of known parser error messages object to facilitate detection of specific cases - Add a specific
ParseErrorWithTokensubclass. This contains the associated token.
2.3.3
July 3, 2024
- Fix tokenization of
string-tokencontaining a backslash followed by CRLF
2.3.2
June 29, 2024
- Optimize
cloneTokens
2.3.1
May 4, 2024
- Fix escaping for the last code point in an ident sequence.
2.3.0
May 4, 2024
- Add
mutateUnithelper function - Add type guard helpers
2.2.4
March 13, 2024
- Correctly tokenize negative zero
-0(for real this time)
2.2.3
December 31, 2023
- Improve documentation.
2.2.2
December 15, 2023
- Fix type definitions
2.2.1
September 24, 2023
- Small performance improvements
2.2.0
July 24, 2023
- Add support for
unicode-range-token - Add
signCharactertoDimensionToken,NumberTokenandPercentageToken - Correctly tokenize negative zero
-0
2.1.1
April 10, 2023
- Document
tokenizehelper function
2.1.0
February 21, 2023
- Add
tokenizehelper function
2.0.2
February 13, 2023
- Relax
isTokento match artificial tokens that correctly follow the interface.
2.0.1
January 28, 2023
- Improve
typesdeclaration inpackage.json
2.0.0
January 19, 2023
- Simplify
Readerinterface (breaking) - Change the
ParseErrorinterface, this is now a subclass ofError(breaking) - Remove the
commentsAreTokensoption astruewas the only desirable value (breaking) - Improve performance
1.0.0
November 14, 2022
- Initial version