@csstools/css-tokenizer
Advanced tools
Comparing version
# Changes to CSS Tokenizer | ||
### 2.4.1 | ||
### 3.0.0 | ||
_July 5, 2024_ | ||
_August 3, 2024_ | ||
- Remove `astNode` that was erroneously added to the `ParseError` base class. | ||
- Updated: Support for Node v18+ (major). | ||
- Improve performance. | ||
### 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 | ||
[Full CHANGELOG](https://github.com/csstools/postcss-plugins/tree/main/packages/css-tokenizer/CHANGELOG.md) |
@@ -40,18 +40,2 @@ /** | ||
/** | ||
* @internal | ||
*/ | ||
export declare type CodePointReader = { | ||
representationStart: number; | ||
representationEnd: number; | ||
cursor: number; | ||
codePointSource: Array<number>; | ||
representationIndices: Array<number>; | ||
source: string; | ||
advanceCodePoint(n?: number): void; | ||
readCodePoint(n?: number): number | false; | ||
unreadCodePoint(n?: number): void; | ||
resetRepresentation(): void; | ||
}; | ||
/** | ||
* The union of all possible CSS tokens | ||
@@ -237,20 +221,2 @@ */ | ||
/** | ||
* @internal | ||
*/ | ||
export declare class Reader implements CodePointReader { | ||
cursor: number; | ||
source: string; | ||
codePointSource: Array<number>; | ||
representationIndices: Array<number>; | ||
length: number; | ||
representationStart: number; | ||
representationEnd: number; | ||
constructor(source: string); | ||
advanceCodePoint(n?: number): void; | ||
readCodePoint(n?: number): number | false; | ||
unreadCodePoint(n?: number): void; | ||
resetRepresentation(): void; | ||
} | ||
/** | ||
* Concatenate the string representation of a list of tokens. | ||
@@ -257,0 +223,0 @@ * This is not a proper serializer that will handle escaping and whitespace. |
{ | ||
"name": "@csstools/css-tokenizer", | ||
"description": "Tokenize CSS", | ||
"version": "2.4.1", | ||
"version": "3.0.0", | ||
"contributors": [ | ||
@@ -28,3 +28,3 @@ { | ||
"engines": { | ||
"node": "^14 || ^16 || >=18" | ||
"node": ">=18" | ||
}, | ||
@@ -31,0 +31,0 @@ "type": "module", |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
72177
-2.56%709
-4.7%