Skip to content

Latest commit

 

History

History
148 lines (79 loc) · 2.45 KB

File metadata and controls

148 lines (79 loc) · 2.45 KB

Changes to CSS Tokenizer

4.0.0

January 14, 2026

  • Updated: Support for Node 20.19.0 or later (major).
  • Removed: commonjs API. In supported Node versions require(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

  • isTokenNumeric and isTokenWhiteSpaceOrComment now accept null and undefined as 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 astNode that was erroneously added to the ParseError base 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 ParseErrorWithToken subclass. This contains the associated token.

2.3.3

July 3, 2024

  • Fix tokenization of string-token containing 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 mutateUnit helper 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 signCharacter to DimensionToken, NumberToken and PercentageToken
  • Correctly tokenize negative zero -0

2.1.1

April 10, 2023

  • Document tokenize helper function

2.1.0

February 21, 2023

  • Add tokenize helper function

2.0.2

February 13, 2023

  • Relax isToken to match artificial tokens that correctly follow the interface.

2.0.1

January 28, 2023

  • Improve types declaration in package.json

2.0.0

January 19, 2023

  • Simplify Reader interface (breaking)
  • Change the ParseError interface, this is now a subclass of Error (breaking)
  • Remove the commentsAreTokens option as true was the only desirable value (breaking)
  • Improve performance

1.0.0

November 14, 2022

  • Initial version