source: trip-planner-front/node_modules/css-tree/CHANGELOG.md@ fa375fe

Last change on this file since fa375fe was 6a3a178, checked in by Ema <ema_spirova@…>, 3 years ago

initial commit

  • Property mode set to 100644
File size: 36.9 KB
Line 
1## 1.1.3 (March 31, 2021)
2
3- Fixed matching on CSS wide keywords for at-rule's prelude and descriptors
4- Added `fit-content` to `width` property patch as browsers are supported it as a keyword (nonstandard), but spec defines it as a function
5- Fixed parsing a value contains parentheses or brackets and `parseValue` option is set to `false`, in that case `!important` was included into a value but must not (#155)
6
7## 1.1.2 (November 26, 2020)
8
9- Rolled back to use spread syntax in object literals since it not supported by nodejs < 8.3 (#145)
10
11## 1.1.1 (November 18, 2020)
12
13- Fixed edge cases in mismatch location computation for `SyntaxMatchError`
14
15## 1.1.0 (November 17, 2020)
16
17- Bumped `mdn-data` to 2.0.14
18- Extended `fork()` method to allow append syntax instead of overriding for `types`, `properties` and `atrules`, e.g. `csstree.fork({ types: { color: '| foo | bar' } })`
19- Extended lexer API for validation
20 - Added `Lexer#checkAtruleName(atruleName)`, `Lexer#checkAtrulePrelude(atruleName, prelude)`, `Lexer#checkAtruleDescriptorName(atruleName, descriptorName)` and `Lexer#checkPropertyName(propertyName)`
21 - Added `Lexer#getAtrule(atruleName, fallbackBasename)` method
22 - Extended `Lexer#getAtrulePrelude()` and `Lexer#getProperty()` methods to take `fallbackBasename` parameter
23 - Improved `SyntaxMatchError` location details
24 - Changed error messages
25
26## 1.0.1 (November 11, 2020)
27
28- Fixed edge cases for parsing of custom property value with a single whitespace when `parseCustomProperty:true`
29
30## 1.0.0 (October 27, 2020)
31
32- Added `onComment` option to parser config
33- Added support for `break` and `skip` values in `walk()` to control traversal
34- Added `List#reduce()` and `List#reduceRight()` methods
35- Bumped `mdn-data` to 2.0.12
36- Exposed version of the lib (i.e. `import { version } from 'css-tree'`)
37- Fixed `Lexer#dump()` to dump atrules syntaxes as well
38- Fixed matching comma separated `<urange>` list (#135)
39- Renamed `HexColor` node type into `Hash`
40- Removed `element()` specific parsing rules
41- Removed `dist/default-syntax.json` from package
42
43## 1.0.0-alpha.39 (December 5, 2019)
44
45- Fixed walker with `visit: "Declaration"` to iterate `DeclarationList` (#114)
46
47## 1.0.0-alpha.38 (November 25, 2019)
48
49- Bumped `mdn-data` to `2.0.6`
50- Added initial implmentation for at-rule matching via `Lexer#matchAtrulePrelude()` and `Lexer#matchAtruleDescriptor()` methods
51- Added `-moz-control-character-visibility`, `-ms-grid-columns`, `-ms-grid-rows` and `-ms-hyphenate-limit-last` properties to patch (#111)
52- Added `flow`, `flow-root` and `table-caption` values to patched `display` (#112)
53
54## 1.0.0-alpha.37 (October 22, 2019)
55
56- Bumped `source-map` version to `^0.6.1` to fix source map generation inconsistency across node.js versions due to mappings sorting bug and v8 moving to [a stable Array#sort](https://v8.dev/blog/array-sort) ([fix commit](https://github.com/mozilla/source-map/commit/f35a2e4212dd025cb5e1fc219e7ac8a4b96c2cc9) in `source-map`)
57
58## 1.0.0-alpha.36 (October 13, 2019)
59
60- Dropped support for Node < 8
61- Updated dev deps (fixed `npm audit` issues)
62- Reworked build pipeline
63 - Package provides `dist/csstree.js` and `dist/csstree.min.js` now (instead of single `dist/csstree.js` that was a min version)
64 - Bundle size (min version) reduced from 191Kb to 158Kb due to some optimisations
65- Definition syntax
66 - Renamed `grammar` into `definitionSyntax` (named per spec)
67 - Added `compact` option to `generate()` method to avoid formatting (spaces) when possible
68- Lexer
69 - Changed `dump()` method to produce syntaxes in compact form by default
70
71## 1.0.0-alpha.35 (October 7, 2019)
72
73- Walker
74 - Changed implementation to avoid runtime compilation due to CSP issues (see #91, #109)
75 - Added `find()`, `findLast()` and `findAll()` methods (e.g. `csstree.find(ast, node => node.type === 'ClassSelector')`)
76
77## 1.0.0-alpha.34 (July 27, 2019)
78
79- Tokenizer
80 - Added `isBOM()` function
81 - Added `charCodeCategory()` function
82 - Removed `firstCharOffset()` function (use `isBOM()` instead)
83 - Removed `CHARCODE` dictionary
84 - Removed `INPUT_STREAM_CODE*` dictionaries
85- Lexer
86 - Allowed comments in matching value (just ignore them like whitespaces)
87 - Increased iteration count in value matching from 10k up to 15k
88 - Fixed missed `debugger` (#104)
89
90## 1.0.0-alpha.33 (July 11, 2019)
91
92- Lexer
93 - Fixed low priority productions matching by changing an approach for robust one (#103)
94
95## 1.0.0-alpha.32 (July 11, 2019)
96
97- Lexer
98 - Fixed low priority productions matching in long `||-` and `&&-` groups (#103)
99
100## 1.0.0-alpha.31 (July 11, 2019)
101
102- Bumped `mdn/data` to `2.0.4` (#99)
103- Lexer
104 - Added [bracketed range notation](https://drafts.csswg.org/css-values-4/#numeric-ranges) support and related refactoring
105 - Removed `<number-zero-one>`, `<number-one-or-greater>` and `<positive-integer>` from generic types. In fact, types moved to patch, because those types can be expressed in a regular grammar due to bracketed range notation implemented
106 - Added support for multiple token string matching
107 - Improved `<custom-ident>` production matching to claim the keyword only if no other unfulfilled production can claim it (#101)
108 - Improved `<length>` production matching to claim "unitless zero" only if no other unfulfilled production can claim it
109 - Changed lexer's constructor to prevent generic types override when used
110 - Fixed large `||`- and `&&`-group matching, matching continues from the beginning on term match (#85)
111 - Fixed checking that value has `var()` occurrences when value is a string (such values can't be matched on syntax currently and fail with specific error that can be used for ignorance in validation tools)
112 - Fixed `<declaration-value>` and `<any-value>` matching when a value contains a function, parentheses or braces
113
114## 1.0.0-alpha.30 (July 3, 2019)
115
116- Bumped `mdn/data` to `~2.0.3`
117 - Removed type removals from `mdn/data` due to lack of some generic types and specific lexer restictions (since lexer was reworked, see below)
118 - Reduced and updated patches
119- Tokenizer
120 - Reworked tokenizer itself to compliment [CSS Syntax Module Level 3](https://drafts.csswg.org/css-syntax/#tokenization)
121 - `Tokenizer` class splitted into several abstractions:
122 - Added `TokenStream` class
123 - Added `OffsetToLocation` class
124 - Added `tokenize()` function that creates `TokenStream` instance for given string or updates a `TokenStream` instance passed as second parameter
125 - Removed `Tokenizer` class
126 - Removed `Raw` token type
127 - Renamed `Identifier` token type to `Ident`
128 - Added token types: `Hash`, `BadString`, `BadUrl`, `Delim`, `Percentage`, `Dimension`, `Colon`, `Semicolon`, `Comma`, `LeftSquareBracket`, `RightSquareBracket`, `LeftParenthesis`, `RightParenthesis`, `LeftCurlyBracket`, `RightCurlyBracket`
129 - Replaced `Punctuator` with `Delim` token type, that excludes specific characters with its own token type like `Colon`, `Semicolon` etc
130 - Removed `findCommentEnd`, `findStringEnd`, `findDecimalNumberEnd`, `findNumberEnd`, `findEscapeEnd`, `findIdentifierEnd` and `findUrlRawEnd` helper function
131 - Removed `SYMBOL_TYPE`, `PUNCTUATION` and `STOP_URL_RAW` dictionaries
132 - Added `isDigit`, `isHexDigit`, `isUppercaseLetter`, `isLowercaseLetter`, `isLetter`, `isNonAscii`, `isNameStart`, `isName`, `isNonPrintable`, `isNewline`, `isWhiteSpace`, `isValidEscape`, `isIdentifierStart`, `isNumberStart`, `consumeEscaped`, `consumeName`, `consumeNumber` and `consumeBadUrlRemnants` helper functions
133- Parser
134 - Changed parsing algorithms to work with new token type set
135 - Changed `HexColor` consumption in way to relax checking a value, i.e. now `value` is a sequence of one or more name chars
136 - Added `&` as a property hack
137 - Relaxed `var()` parsing to only check that a first arguments is an identifier (not a custom property name as before)
138- Lexer
139 - Reworked syntax matching to relay on token set only (having AST is optional now)
140 - Extended `Lexer#match()`, `Lexer#matchType()` and `Lexer#matchProperty()` methods to take a string as value, beside AST as a value
141 - Extended `Lexer#match()` method to take a string as a syntax, beside of syntax descriptor
142 - Reworked generic types:
143 - Removed `<attr()>`, `<url>` (moved to patch) and `<progid>` types
144 - Added types:
145 - Related to token types: `<ident-token>`, `<function-token>`, `<at-keyword-token>`, `<hash-token>`, `<string-token>`, `<bad-string-token>`, `<url-token>`, `<bad-url-token>`, `<delim-token>`, `<number-token>`, `<percentage-token>`, `<dimension-token>`, `<whitespace-token>`, `<CDO-token>`, `<CDC-token>`, `<colon-token>`, `<semicolon-token>`, `<comma-token>`, `<[-token>`, `<]-token>`, `<(-token>`, `<)-token>`, `<{-token>` and `<}-token>`
146 - Complex types: `<an-plus-b>`, `<urange>`, `<custom-property-name>`, `<declaration-value>`, `<any-value>` and `<zero>`
147 - Renamed `<unicode-range>` to `<urange>` as per spec
148 - Renamed `<expression>` (IE legacy extension) to `<-ms-legacy-expression>` and may to be removed in next releases
149
150## 1.0.0-alpha.29 (May 30, 2018)
151
152- Lexer
153 - Syntax matching was completely reworked. Now it's token-based and uses state machine. Public API has not changed. However, some internal data structures have changed. Most significal change in syntax match result tree structure, it's became token-based instead of node-based.
154 - Grammar
155 - Changed grammar tree format:
156 - Added `Token` node type to represent a single code point (`<delim-token>`)
157 - Added `Multiplier` that wraps a single node (`term` property)
158 - Added `AtKeyword` to represent `<at-keyword-token>`
159 - Removed `Slash` and `Percent` node types, they are replaced for a node with `Token` type
160 - Changed `Function` to represent `<function-token>` with no children
161 - Removed `multiplier` property from `Group`
162 - Changed `generate()` method:
163 - Method takes an `options` as second argument now (`generate(node, forceBraces, decorator)` -> `generate(node, options)`). Two options are supported: `forceBraces` and `decorator`
164 - When a second parameter is a function it treats as `decorate` option value, i.e. `generate(node, fn)` -> `generate(node, { decorate: fn })`
165 - Decorate function invokes with additional parameter – a reference to a node
166- Tokenizer
167 - Renamed `Atrule` const to `AtKeyword`
168
169## 1.0.0-alpha.28 (February 19, 2018)
170
171- Renamed `lexer.grammar.translate()` method into `generate()`
172- Fixed `<'-webkit-font-smoothing'>` and `<'-moz-osx-font-smoothing'>` syntaxes (#75)
173- Added vendor keywords for `<'overflow'>` property syntax (#76)
174- Pinned `mdn-data` to `~1.1.0` and fixed issues with some updated property syntaxes
175
176## 1.0.0-alpha.27 (January 14, 2018)
177
178- Generator
179 - Changed node's `generate()` methods invocation, methods now take a node as a single argument and context (i.e. `this`) that have methods: `chunk()`, `node()` and `children()`
180 - Renamed `translate()` to `generate()` and changed to take `options` argument
181 - Removed `translateMarkup(ast, enter, leave)` method, use `generate(ast, { decorator: (handlers) => { ... }})` instead
182 - Removed `translateWithSourceMap(ast)`, use `generate(ast, { sourceMap: true })` instead
183 - Changed to support for children as an array
184- Walker
185 - Changed `walk()` to take an `options` argument instead of handler, with `enter`, `leave`, `visit` and `reverse` options (`walk(ast, fn)` is still works and equivalent to `walk(ast, { enter: fn })`)
186 - Removed `walkUp(ast, fn)`, use `walk(ast, { leave: fn })`
187 - Removed `walkRules(ast, fn)`, use `walk(ast, { visit: 'Rule', enter: fn })` instead
188 - Removed `walkRulesRight(ast, fn)`, use `walk(ast, { visit: 'Rule', reverse: true, enter: fn })` instead
189 - Removed `walkDeclarations(ast, fn)`, use `walk(ast, { visit: 'Declaration', enter: fn })` instead
190 - Changed to support for children as array in most cases (`reverse: true` will fail on arrays since they have no `forEachRight()` method)
191- Misc
192 - List
193 - Added `List#forEach()` method
194 - Added `List#forEachRight()` method
195 - Added `List#filter()` method
196 - Changed `List#map()` method to return a `List` instance instead of `Array`
197 - Added `List#push()` method, similar to `List#appendData()` but returns nothing
198 - Added `List#pop()` method
199 - Added `List#unshift()` method, similar to `List#prependData()` but returns nothing
200 - Added `List#shift()` method
201 - Added `List#prependList()` method
202 - Changed `List#insert()`, `List#insertData()`, `List#appendList()` and `List#insertList()` methods to return a list that performed an operation
203 - Changed `keyword()` method
204 - Changed `name` field to include a vendor prefix
205 - Added `basename` field to contain a name without a vendor prefix
206 - Added `custom` field that contain a `true` when keyword is a custom property reference
207 - Changed `property()` method
208 - Changed `name` field to include a vendor prefix
209 - Added `basename` field to contain a name without any prefixes, i.e. a hack and a vendor prefix
210 - Added `vendorPrefix()` method
211 - Added `isCustomProperty()` method
212
213## 1.0.0-alpha.26 (November 9, 2017)
214
215- Tokenizer
216 - Added `Tokenizer#isBalanceEdge()` method
217 - Removed `Tokenizer.endsWith()` method
218- Parser
219 - Made the parser tolerant to errors by default
220 - Removed `tolerant` parser option (no parsing modes anymore)
221 - Removed `property` parser option (a value parsing does not depend on property name anymore)
222 - Canceled error for a handing semicolon in a block
223 - Canceled error for unclosed `Brackets`, `Function` and `Parentheses` when EOF is reached
224 - Fixed error when prelude ends with a comment for at-rules with custom prelude consumer
225 - Relaxed at-rule parsing:
226 - Canceled error when EOF is reached after a prelude
227 - Canceled error for an at-rule with custom block consumer when at-rule has no block (just don't apply consumer in that case)
228 - Canceled error on at-rule parsing when it occurs outside prelude or block (at-rule is converting to `Raw` node)
229 - Allowed for any at-rule to have a prelude and a block, even if it's invalid per at-rule syntax (the responsibility for this check is moved to lexer, since it's possible to construct a AST with such errors)
230 - Made a declaration value a safe parsing point (i.e. error on value parsing lead to a value is turning into `Raw` node, not a declaration as before)
231 - Excluded surrounding white spaces and comments from a `Raw` node that represents a declaration value
232 - Changed `Value` parse handler to return a node only with type `Value` (previously it returned a `Raw` node in some cases)
233 - Fixed issue with `onParseError()` is not invoked for errors occured on selector or declaration value parsing in some cases
234 - Changed using of `onParseError()` to stop parsing if handler throws an exception
235- Lexer
236 - Changed `grammar.walk()` to invoke passed handler on entering to node rather than on leaving the node
237 - Improved `grammar.walk()` to take a walk handler pair as an object, i.e. `walk(node, { enter: fn, leave: fn })`
238 - Changed `Lexer#match*()` methods to take a node of any type, but with a `children` field
239 - Added `Lexer#match(syntax, node)` method
240 - Fixed `Lexer#matchType()` method to stop return a positive result for the CSS wide keywords
241
242## 1.0.0-alpha25 (October 9, 2017)
243
244- Parser
245 - Added fallback node as argument to `onParseError()` handler
246 - Fixed raw consuming in tolerant mode when selector is invalid (greedy consuming and redundant warnings)
247 - Fixed exception in tolerant mode caused by unknown at-rule with unclosed block
248 - Changed handling of semicolons:
249 - Hanging semicolon inside declaration blocks raise an error or turns into a `Raw` node in tolerant mode instead of being ignored
250 - Semicolon outside of declaration blocks opens a `Rule` node as part of selector instead of being ignored
251 - Aligned `parseAtrulePrelude` behaviour to `parseRulePrelude`
252 - Removed `Raw` node wraping into `AtrulePrelude` when `parseAtrulePrelude` is disabled
253 - Removed error emitting when at-rule has a custom prelude customer but no prelude is found (it should be validated by a lexer later)
254- Generator
255 - Fixed performance issue with `translateWithSourceMap()`, flattening the string (because of mixing building string and indexing into it) turned it into a quadratic algorithm (approximate numbers can be found in [the quiz created by this case](https://gist.github.com/lahmatiy/ea25d0e623d88ca9848384b5707d52d9))
256- Added support for a single solidus hack for `property()`
257- Minor fixes for custom errors
258
259## 1.0.0-alpha24 (September 14, 2017)
260
261- Improved CSSTree to be stable for standart build-in objects extension (#58)
262- Parser
263 - Renamed rule's `selector` to `prelude`. The reasons: [spec names this part so](https://www.w3.org/TR/css-syntax-3/#qualified-rule), and this branch can contain not only a selector (`SelectorList`) but also a raw payload (`Raw`). What's changed:
264 - Renamed `Rule.selector` to `Rule.prelude`
265 - Renamed `parseSelector` parser option to `parseRulePrelude`
266 - Removed option for selector parse in `SelectorList`
267- Lexer
268 - Fixed undefined positions in a error when match a syntax to empty or white space only value
269 - Improved `Lexer#checkStructure()`
270 - Return a warning as an object with node reference and message
271 - No exception on unknown node type, return a warning instead
272
273## 1.0.0-alpha23 (September 10, 2017)
274
275- Fixed `Tokenizer#getRawLength()`'s false positive balance match to the end of input in some cases (#56)
276- Rename walker's entry point methods to be the same as CSSTree exposed methods (i.e. `walk()`, `walkUp()` etc)
277- Rename at-rule's `expression` to `prelude` (since [spec names it so](https://www.w3.org/TR/css-syntax-3/#at-rule))
278 - `AtruleExpression` node type → `AtrulePrelude`
279 - `Atrule.expression` field → `Atrule.prelude`
280 - `parseAtruleExpression` parser's option → `parseAtrulePrelude`
281 - `atruleExpression` parse context → `atrulePrelude`
282 - `atruleExpression` walk context reference → `atrulePrelude`
283
284## 1.0.0-alpha22 (September 8, 2017)
285
286- Parser
287 - Fixed exception on parsing of unclosed `{}-block` in tolerant mode
288 - Added tolerant mode support for `DeclarationList`
289 - Added standalone entry point, i.e. default parser can be used via `require('css-tree/lib/parser')` (#47)
290- Generator
291 - Changed generator to produce `+n` when `AnPlusB.a` is `+1` to be "round-trip" with parser
292 - Added standalone entry point, i.e. default generators can be used via `require('css-tree/lib/generator')`
293- Walker
294 - Added standalone entry point, i.e. default walkers can be used via `require('css-tree/lib/walker')` (#47)
295- Lexer
296 - Added `default` keyword to the list of invalid values for `<custom-ident>` (since it reversed per [spec](https://www.w3.org/TR/css-values/#custom-idents))
297- Convertors (`toPlainObject()` and `fromPlainObject()`) moved to `lib/convertor` (entry point is `require('css-tree/lib/convertor')`)
298
299## 1.0.0-alpha21 (September 5, 2017)
300
301- Tokenizer
302 - Added `Raw` token type
303 - Improved tokenization of `url()` with raw as url to be more spec complient
304 - Added `Tokenizer#balance` array computation on token layout
305 - Added `Tokenizer#getRawLength()` to compute a raw length with respect of block balance
306 - Added `Tokenizer#getTokenStart(offset)` method to get token start offset by token index
307 - Added `idx` and `balance` fields to each token of `Tokenizer#dump()` method result
308- Parser
309 - Added `onParseError` option
310 - Reworked node parsers that consume a `Raw` node to use a new approach. Since now a `Raw` node builds in `parser#Raw()` function only
311 - Changed semantic of `parser#Raw()`, it takes 5 parameters now (it might to be changed in future)
312 - Changed `parser#tolerantParse()` to pass a start token index to fallback function instead of source offset
313 - Fixed `AtruleExpression` consuming in tolerant mode
314 - Atrule handler to convert an empty `AtruleExpression` node into `null`
315 - Changed `AtruleExpression` handler to always return a node (before it could return a `null` in some cases)
316- Lexer
317 - Fixed comma match node for `#` multiplier
318 - Added reference name to `SyntaxReferenceError`
319- Additional fixes on custom errors
320- Reduced possible corruption of base config by `syntax.fork()`
321
322## 1.0.0-alpha20 (August 28, 2017)
323
324- Tokenizer
325 - Added `Atrule` token type (`<at-rule-token>` per spec)
326 - Added `Function` token type (`<function-token>` per spec)
327 - Added `Url` token type
328 - Replaced `Tokenizer#getTypes()` method with `Tokenizer#dump()` to get all tokens as an array
329 - Renamed `Tokenizer.TYPE.Whitespace` to `Tokenizer.TYPE.WhiteSpace`
330 - Renamed `Tokenizer.findWhitespaceEnd()` to `Tokenizer.findWhiteSpaceEnd()`
331- Parser
332 - Added initial implementation of tollerant mode (turn on by passing `tolerant: true` option). In this mode parse errors are never occour and any invalid part of CSS turns into a `Raw` node. Current safe points: `Atrule`, `AtruleExpression`, `Rule`, `Selector` and `Declaration`. Feature is experimental and further improvements are planned.
333 - Changed `Atrule.expression` to contain a `AtruleExpression` node or `null` only (other node types is wrapping into a `AtruleExpression` node)
334 - Renamed `AttributeSelector.operator` to `AttributeSelector.matcher`
335- Generator
336 - `translate()` method is now can take a function as second argument, that recieves every generated chunk. When no function is passed, default handler is used, it concats all the chunks and method returns a string.
337- Lexer
338 - Used [mdn/data](https://github.com/mdn/data) package as source of lexer's grammar instead of local dictionaries
339 - Added `x` unit to `<resolution>` generic type
340 - Improved match tree:
341 - Omited Group (sequences) match nodes
342 - Omited empty match nodes (for terms with `zero or more` multipliers)
343 - Added `ASTNode` node type to contain a reference to AST node
344 - Fixed node duplication (uncompleted match were added to tree)
345 - Added AST node reference in match nodes
346 - Added comma match node by `#` multiplier
347 - Grammar
348 - Changed `translate()` function to get a handler as third argument (optional). That handler recieves result of node traslation and can be used for decoration purposes. See [example](https://github.com/csstree/docs/blob/04c65af44477b5ea05feb373482898122b2a4528/docs/syntax.html#L619-L627)
349 - Added `SyntaxParseError` to grammar export
350 - Reworked group and multipliers representation in syntax tree:
351 - Replaced `Sequence` for `Group` node type (`Sequence` node type removed)
352 - Added `explicit` boolean property for `Group`
353 - Only groups can have a multiplier now (other node types is wrapping into a single term implicit group when multiplier is applied)
354 - Renamed `nonEmpty` Group's property to `disallowEmpty`
355 - Added optimisation for syntax tree by dropping redundant root `Group` when it contains a single `Group` term (return this `Group` as a result)
356 - Changed lexer's match functionality
357 - Changed `Lexer#matchProperty()` and `Lexer#matchType()` to return an object instead of match tree. A match tree stores in `matched` field when AST is matched to grammar successfully, otherwise an error in `error` field. The result object also has some methods to test AST node against a match tree: `getTrace()`, `isType()`, `isProperty()` and `isKeyword()`
358 - Added `Lexer#matchDeclaration()` method
359 - Removed `Lexer#lastMatchError` (error stores in match result object in `error` field)
360 - Added initial implementation of search for AST segments (new lexer methods: `Lexer#findValueSegments()`, `Lexer#findDeclarationValueSegments()` and `Lexer#findAllSegments`)
361 - Implemented `SyntaxReferenceError` for unknown property and type references
362- Renamed field in resulting object of `property()` function: `variable` → `custom`
363- Fixed issue with readonly properties (e.g. `line` and `column`) of `Error` and exception on attempt to write in iOS Safari
364
365## 1.0.0-alpha19 (April 24, 2017)
366
367- Extended `List` class with new methods:
368 - `List#prepend(item)`
369 - `List#prependData(data)`
370 - `List#insertData(data)`
371 - `List#insertList(list)`
372 - `List#replace(item, itemOrList)`
373
374## 1.0.0-alpha18 (April 3, 2017)
375
376- Added `atrule` walk context (#39)
377- Changed a result of generate method for `AnPlusB`, `AttributeSelector`, `Function`, `MediaFeature` and `Ratio` ([1e95877](https://github.com/csstree/csstree/commit/1e9587710efa8e9338bcf0bc794b4b45f286231d))
378- Fixed typo in `List` exception messages (@strarsis, #42)
379- Improved tokenizer to convert an input to a string
380
381## 1.0.0-alpha17 (March 13, 2017)
382
383- Implemented new concept of `syntax`
384 - Changed main `exports` to expose a default syntax
385 - Defined initial [CSS syntax](lib/syntax/default.js)
386 - Implemented `createSyntax()` method to create a new syntax from scratch
387 - Implemented `fork()` method to create a new syntax based on given via extension
388- Parser
389 - Implemented `mediaQueryList` and `mediaQuery` parsing contexts
390 - Implemented `CDO` and `CDC` node types
391 - Implemented additional declaration property prefix hacks (`#` and `+`)
392 - Added support for UTF-16LE BOM
393 - Added support for `@font-face` at-rule
394 - Added `chroma()` to legacy IE filter functions
395 - Improved `HexColor` to consume hex only
396 - Improved support for `\0` and `\9` hacks (#2)
397 - Relaxed number check for `Ratio` terms
398 - Allowed fractal values as a `Ratio` term
399 - Disallowed zero number as a `Ratio` term
400 - Changed important clause parsing
401 - Allowed any identifier for important (to support hacks like `!ie`)
402 - Store `true` for `important` field in case identifier equals to `important` and string otherwise
403 - Fixed parse error formatted message rendering to take into account tabs
404 - Removed exposing of `Parser` class
405 - Removed `readSelectorSequence()`, `readSequenceFallback()` and `readSelectorSequenceFallback` methods
406 - Used single universal sequence consumer for `AtruleExpression`, `Selector` and `Value`
407- Generator
408 - Reworked generator to use auto-generated functions based on syntax definition (additional work to be done in next releases)
409 - Implemented `translateMarkup(ast, before, after)` method for complex cases
410 - Reworked `translateWithSourceMap` to be more flexible (based on `translateMarkup`, additional work to be done in next releases)
411- Walker
412 - Reworked walker to use auto-generated function based on syntax definition (additional work to be done in next releases)
413- Lexer
414 - Prepared for better extensibility (additional work to be done in next releases)
415 - Implemented `checkStructure(ast)` method to check AST structure based on syntax definition
416 - Update syntax dictionaries to latest `mdn/data`
417 - Add missing `<'offset-position'>` syntax
418 - Extended `<position>` property with `-webkit-sticky` (@sergejmueller, #37)
419 - Improved mismatch error position
420- Implemented script (`gen:syntax`) to generate AST format reference page (`docs/ast.md`) using syntax definition
421
422## 1.0.0-alpha16 (February 12, 2017)
423
424- Exposed `Parser` class
425- Added `startOffset` option to `Tokenizer` (constructor and `setSource()` method)
426- Added fallback functions for default (`readSequenceFallback`) and selector (`readSelectorSequenceFallback`) sequence readers
427- Fixed edge cases for `AnPlusB`
428- Fixed wrong whitespace ignoring in `Selector` consumer
429
430## 1.0.0-alpha15 (February 8, 2017)
431
432- Fixed broken `atruleExpression` context
433- Fixed vendor prefix detection in `keyword()` and `property()`
434- Fixed `property()` to not lowercase custom property names
435- Added `variable` boolean flag in `property()` result
436- Renamed `scanner` into `tokenizer`
437- Ranamed `syntax` into `lexer`
438- Moved `docs/*.html` files to [csstree/docs](https://github.com/csstree/docs) repo
439- Added `element()` function for `Value` context (`-moz-element()` supported as well)
440- Merged `Universal` node type into `Type`
441- Renamed node types:
442 - `Id` -> `IdSelector`
443 - `Class` -> `ClassSelector`
444 - `Type` -> `TypeSelector`
445 - `Attribute` -> `AttributeSelector`
446 - `PseudoClass` -> `PseudoClassSelector`
447 - `PseudoElement` -> `PseudoElementSelector`
448 - `Hash` -> `HexColor`
449 - `Space` -> `WhiteSpace`
450 - `An+B` -> `AnPlusB`
451- Removed `Progid` node type
452- Relaxed `MediaQuery` consumer to not validate syntax on parse and to include whitespaces in children sequence as is
453- Added `WhiteSpace.value` property to store whitespace sequence
454- Implemented parser options to specify what should be parsed in details (when option is `false` some part of CSS represents as balanced `Raw`):
455 - `parseAtruleExpression` – to parse at-rule expressions (`true` by default)
456 - `parseSelector` – to parse rule's selector (`true` by default)
457 - `parseValue` - to parse declaration's value (`true` by default)
458 - `parseCustomProperty` – to parse value and fallback of custom property (`false` by default)
459- Changed tokenization to stick leading hyphen minus to identifier token
460- Changed selector parsing:
461 - Don't convert spaces into descendant combinator
462 - Don't validate selector structure on parsing (selectors may be checked by lexer later)
463- Initial refactoring of [docs](https://github.com/csstree/csstree/blob/master/docs)
464- Various improvements and fixes
465
466## 1.0.0-alpha14 (February 3, 2017)
467
468- Implemented `DeclarationList`, `MediaQueryList`, `MediaQuery`, `MediaFeature` and `Ratio` node types
469- Implemented `declarationList` context (useful to parse HTML `style` attribute content)
470- Implemented custom consumers for `@import`, `@media`, `@page` and `@supports` at-rules
471- Implemented `atrule` option for `parse()` config, is used for `atruleExpession` context to specify custom consumer for at-rule if any
472- Added `Scanner#skipWS()`, `Scanner#eatNonWS()`, `Scanner#consume()` and `Scanner#consumeNonWS()` helper methods
473- Added custom consumers for known functional-pseudos, consume unknown functional-pseudo content as balanced `Raw`
474- Allowed any `PseudoElement` to be a functional-pseudo (#33)
475- Improved walker implementations to reduce GC thrashing by reusing cursors
476- Changed `Atrule.block` to contain a `Block` node type only if any
477- Changed `Block.loc` positions to include curly brackets
478- Changed `Atrule.expression` to store a `null` if no expression
479- Changed parser to use `StyleSheet` node type only for top level node (when context is `stylesheet`, that's by default)
480- Changed `Parentheses`, `Brackets` and `Function` consumers to use passed sequence reader instead of its own
481- Changed `Value` and `AtruleExpression` consumers to use common sequence reader (that reader was used by `Value` consumer before)
482- Changed default sequence reader to exclude storage of spaces around `Comma`
483- Changed processing of custom properties:
484 - Consume declaration value as balanced `Raw`
485 - Consume `var()` fallback value as balanced `Raw`
486 - Validate first argument of `var()` starts with double dash
487 - Custom property's value and fallback includes spaces around
488- Fixed `Nth` to have a `loc` property
489- Fixed `SelectorList.loc` and `Selector.loc` positions to exclude spaces
490- Fixed issue Browserify build fail with `default-syntax.json` is not found error (#32, @philschatz)
491- Disallowed `Type` selector starting with dash (parser throws an error in this case now)
492- Disallowed empty selectors for `Rule` (not sure if it's correct but looks reasonable)
493- Removed `>>` combinator support until any browser support (no signals about that yet)
494- Removed `PseudoElement.legacy` property
495- Removed special case for `:before`, `:after`, `:first-letter` and `:first-line` to represent them as `PseudoElement`, now those pseudos are represented as `PseudoClass` nodes
496- Removed deprecated `Syntax#match()` method
497- Parser was splitted into modules and related changes, one step closer to an extensible parser
498- Various fixes and improvements, all changes have negligible impact on performance
499
500## 1.0.0-alpha13 (January 19, 2017)
501
502- Changed location storing in `SyntaxMatchError`
503 - Changed property to store mismatch offset to `mismatchOffset`
504 - Changed `offset` property to store bad node offset in source CSS if any
505 - Added `loc` property that stores bad node `loc` if any
506
507## 1.0.0-alpha12 (January 19, 2017)
508
509- Fixed `Syntax#matchProperty()` method to always return a positive result for custom properties since syntax is never defined for them (#31)
510- Implemented `fromPlainObject()` and `toPlainObject()` to convert plain object to AST or AST to plain object (currently converts `List` <-> `Array`)
511
512## 1.0.0-alpha11 (January 18, 2017)
513
514- Added support for `:matches(<selector-list>)` (#28)
515- Added support for `:has(<relative-selector-list>)`
516- Added support for `::slotted(<compound-selector>)`
517- Implemented `Brackets` node type
518- Implemented basic support for at-rule inside rule block (#24)
519- Renamed `Selector` node type to `SelectorList`
520- Renamed `SimpleSelector` node type to `Selector`
521- Renamed `UnicodeRange.name` property to `UnicodeRange.value`
522- Replaced `Negation` node type for regular `PseudoClass`
523- Unified name of node property to store nested nodes, it always `children` now:
524 - `StyleSheet.rules` -> `StyleSheet.children`
525 - `SelectorList.selectors` -> `SelectorList.children`
526 - `Block.declarations` -> `Block.children`
527 - `*.sequence` -> `*.children`
528- Fixed edge cases in parsing `Hex` and `UnicodeRange` when number not an integer
529- Changed `nth-` pseudos parsing
530 - Implemented `An+B` node type to represent expressions like `2n + 1` or `-3n`
531 - Fixed edge cases when `a` or `b` is not an integer
532 - Changed `odd` and `even` keywords processing, keywords are storing as `Identifier` node type now
533 - Changed `Nth` node type format to store a `nth`-query and an optional `selector`
534 - Implemented `of` clause for `nth-` pseudos (a.e. `:nth-child(2n + 1 of li, img)`)
535 - Limited `Nth` parsing rules to `:nth-child()`, `:nth-last-child()`, `:nth-of-type()` and `:nth-last-of-type()` pseudos
536- Changed the way to store locations
537 - Renamed `info` node property to `loc`
538 - Changed format of `loc` to store `start` and `end` positions
539
540## 1.0.0-alpha10 (January 11, 2017)
541
542- Reworked `Scanner` to be a single point to its functionality
543- Exposed `Scanner` class to be useful for external projects
544- Changed `walk()` function behaviour to traverse AST nodes in natural order
545- Implemented `walkUp()` function to traverse AST nodes from deepest to parent (behaves as `walk()` before)
546
547## 1.0.0-alpha9 (December 21, 2016)
548
549- Fixed `<angle>` generic according to specs that allow a `<number>` equals to zero to be used as valid value (#30)
550
551## 1.0.0-alpha8 (November 11, 2016)
552
553- Fixed `Scanner#skip()` issue method when cursor is moving to the end of source
554- Simplified `Progid` node
555- Changed behaviour for bad selector processing, now parsing fails instead of selector ignoring
556- Fixed `<id-selector>` generic syntax
557- Added `q` unit for `<length>` generic syntax
558- Refactored syntax parser (performance)
559- Reduced startup time by implementing lazy syntax parsing (default syntax doesn't parse on module load)
560- Updated syntax dictionaries and used [`mdn/data`](https://github.com/mdn/data) instead of `Template:CSSData`
561- Renamed `syntax.stringify()` method to `syntax.translate()`
562- Simplified generic syntax functions, those functions receive a single AST node for checking and should return `true` or `false`
563- Added exception for values that contains `var()`, those values are always valid for now
564- Added more tests and increase code coverage to `98.5%`
565
566## 1.0.0-alpha7 (October 7, 2016)
567
568- Added support for explicit descendant combinator (`>>`)
569- Implemented `Type` and `Universal` type nodes
570- Improved `Number` parsing by including sign and exponent (#26)
571- Parse `before`, `after`, `first-letter` and `first-line` pseudos with single colon as `PseudoElement`
572- Changed `FunctionalPseudo` node type to `PseudoClass`
573- Fixed attribute selector name parsing (namespace edge cases)
574- Fixed location calculation for specified offset when `eof` is reached
575- Added more non-standard colors (#25)
576- Removed obsolete `Syntax#getAll()` method
577- Fixed various edge cases, code clean up and performance improvements
578
579## 1.0.0-alpha6 (September 23, 2016)
580
581- More accurate positions for syntax mismatch errors
582- Added [`apple`](https://webkit.org/blog/3709/using-the-system-font-in-web-content/) specific font keywords (#20)
583- Changed `Property` node stucture from object to string
584- Renamed `Ruleset` node type to `Rule`
585- Removed `Argument` node type
586- Fixed `Dimension` and `Percentage` position computation
587- Fixed bad selector parsing (temporary solution)
588- Fixed location computation for CSS with very long lines that may lead to really long parsing with `positions:true` (even freeze)
589- Fixed `line` and `column` computation for `SyntaxMatch` error
590- Improved performance of parsing and translation. Now CSSTree is under 10ms in [PostCSS benchmark](https://github.com/postcss/benchmark).
Note: See TracBrowser for help on using the repository browser.