Update dependency css-tree to v1.0.0 #405
Open
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR contains the following updates:
1.0.0-alpha.39
->1.0.0
Release Notes
csstree/csstree
v1.0.0
Compare Source
onComment
option to parser configbreak
andskip
values inwalk()
to control traversalList#reduce()
andList#reduceRight()
methodsmdn-data
to 2.0.12import { version } from 'css-tree'
)Lexer#dump()
to dump atrules syntaxes as well<urange>
list (#135)HexColor
node type intoHash
element()
specific parsing rulesdist/default-syntax.json
from packagev1.0.0-alpha9
Compare Source
<angle>
generic according to specs that allow a<number>
equals to zero to be used as valid value (#30)v1.0.0-alpha8
Compare Source
Scanner#skip()
issue method when cursor is moving to the end of sourceProgid
node<id-selector>
generic syntaxq
unit for<length>
generic syntaxmdn/data
instead ofTemplate:CSSData
syntax.stringify()
method tosyntax.translate()
true
orfalse
var()
, those values are always valid for now98.5%
v1.0.0-alpha7
Compare Source
>>
)Type
andUniversal
type nodesNumber
parsing by including sign and exponent (#26)before
,after
,first-letter
andfirst-line
pseudos with single colon asPseudoElement
FunctionalPseudo
node type toPseudoClass
eof
is reachedSyntax#getAll()
methodv1.0.0-alpha6
Compare Source
apple
specific font keywords (#20)Property
node stucture from object to stringRuleset
node type toRule
Argument
node typeDimension
andPercentage
position computationpositions:true
(even freeze)line
andcolumn
computation forSyntaxMatch
errorv1.0.0-alpha5
Compare Source
v1.0.0-alpha4
Compare Source
v1.0.0-alpha3
Compare Source
v1.0.0-alpha25
Compare Source
onParseError()
handlerRaw
node in tolerant mode instead of being ignoredRule
node as part of selector instead of being ignoredparseAtrulePrelude
behaviour toparseRulePrelude
Raw
node wraping intoAtrulePrelude
whenparseAtrulePrelude
is disabledtranslateWithSourceMap()
, 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)property()
v1.0.0-alpha24
Compare Source
selector
toprelude
. The reasons: spec names this part so, and this branch can contain not only a selector (SelectorList
) but also a raw payload (Raw
). What's changed:Rule.selector
toRule.prelude
parseSelector
parser option toparseRulePrelude
SelectorList
Lexer#checkStructure()
v1.0.0-alpha23
Compare Source
Tokenizer#getRawLength()
's false positive balance match to the end of input in some cases (#56)walk()
,walkUp()
etc)expression
toprelude
(since spec names it so)AtruleExpression
node type →AtrulePrelude
Atrule.expression
field →Atrule.prelude
parseAtruleExpression
parser's option →parseAtrulePrelude
atruleExpression
parse context →atrulePrelude
atruleExpression
walk context reference →atrulePrelude
v1.0.0-alpha22
Compare Source
{}-block
in tolerant modeDeclarationList
require('css-tree/lib/parser')
(#47)+n
whenAnPlusB.a
is+1
to be "round-trip" with parserrequire('css-tree/lib/generator')
require('css-tree/lib/walker')
(#47)default
keyword to the list of invalid values for<custom-ident>
(since it reversed per spec)toPlainObject()
andfromPlainObject()
) moved tolib/convertor
(entry point isrequire('css-tree/lib/convertor')
)v1.0.0-alpha21
Compare Source
Raw
token typeurl()
with raw as url to be more spec complientTokenizer#balance
array computation on token layoutTokenizer#getRawLength()
to compute a raw length with respect of block balanceTokenizer#getTokenStart(offset)
method to get token start offset by token indexidx
andbalance
fields to each token ofTokenizer#dump()
method resultonParseError
optionRaw
node to use a new approach. Since now aRaw
node builds inparser#Raw()
function onlyparser#Raw()
, it takes 5 parameters now (it might to be changed in future)parser#tolerantParse()
to pass a start token index to fallback function instead of source offsetAtruleExpression
consuming in tolerant modeAtruleExpression
node intonull
AtruleExpression
handler to always return a node (before it could return anull
in some cases)#
multiplierSyntaxReferenceError
syntax.fork()
v1.0.0-alpha20
Compare Source
Atrule
token type (<at-rule-token>
per spec)Function
token type (<function-token>
per spec)Url
token typeTokenizer#getTypes()
method withTokenizer#dump()
to get all tokens as an arrayTokenizer.TYPE.Whitespace
toTokenizer.TYPE.WhiteSpace
Tokenizer.findWhitespaceEnd()
toTokenizer.findWhiteSpaceEnd()
tolerant: true
option). In this mode parse errors are never occour and any invalid part of CSS turns into aRaw
node. Current safe points:Atrule
,AtruleExpression
,Rule
,Selector
andDeclaration
. Feature is experimental and further improvements are planned.Atrule.expression
to contain aAtruleExpression
node ornull
only (other node types is wrapping into aAtruleExpression
node)AttributeSelector.operator
toAttributeSelector.matcher
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.x
unit to<resolution>
generic typezero or more
multipliers)ASTNode
node type to contain a reference to AST node#
multipliertranslate()
function to get a handler as third argument (optional). That handler recieves result of node traslation and can be used for decoration purposes. See exampleSyntaxParseError
to grammar exportSequence
forGroup
node type (Sequence
node type removed)explicit
boolean property forGroup
nonEmpty
Group's property todisallowEmpty
Group
when it contains a singleGroup
term (return thisGroup
as a result)Lexer#matchProperty()
andLexer#matchType()
to return an object instead of match tree. A match tree stores inmatched
field when AST is matched to grammar successfully, otherwise an error inerror
field. The result object also has some methods to test AST node against a match tree:getTrace()
,isType()
,isProperty()
andisKeyword()
Lexer#matchDeclaration()
methodLexer#lastMatchError
(error stores in match result object inerror
field)Lexer#findValueSegments()
,Lexer#findDeclarationValueSegments()
andLexer#findAllSegments
)SyntaxReferenceError
for unknown property and type referencesproperty()
function:variable
→custom
line
andcolumn
) ofError
and exception on attempt to write in iOS Safariv1.0.0-alpha2
Compare Source
onParseError()
handlerRaw
node in tolerant mode instead of being ignoredRule
node as part of selector instead of being ignoredparseAtrulePrelude
behaviour toparseRulePrelude
Raw
node wraping intoAtrulePrelude
whenparseAtrulePrelude
is disabledtranslateWithSourceMap()
, 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)property()
v1.0.0-alpha19
Compare Source
List
class with new methods:List#prepend(item)
List#prependData(data)
List#insertData(data)
List#insertList(list)
List#replace(item, itemOrList)
v1.0.0-alpha18
Compare Source
atrule
walk context (#39)AnPlusB
,AttributeSelector
,Function
,MediaFeature
andRatio
(1e95877)List
exception messages (@strarsis, #42)v1.0.0-alpha17
Compare Source
syntax
exports
to expose a default syntaxcreateSyntax()
method to create a new syntax from scratchfork()
method to create a new syntax based on given via extensionmediaQueryList
andmediaQuery
parsing contextsCDO
andCDC
node types#
and+
)@font-face
at-rulechroma()
to legacy IE filter functionsHexColor
to consume hex only\0
and\9
hacks (#2)Ratio
termsRatio
termRatio
term!ie
)true
forimportant
field in case identifier equals toimportant
and string otherwiseParser
classreadSelectorSequence()
,readSequenceFallback()
andreadSelectorSequenceFallback
methodsAtruleExpression
,Selector
andValue
translateMarkup(ast, before, after)
method for complex casestranslateWithSourceMap
to be more flexible (based ontranslateMarkup
, additional work to be done in next releases)checkStructure(ast)
method to check AST structure based on syntax definitionmdn/data
<'offset-position'>
syntax<position>
property with-webkit-sticky
(@sergejmueller, #37)gen:syntax
) to generate AST format reference page (docs/ast.md
) using syntax definitionv1.0.0-alpha16
Compare Source
Parser
classstartOffset
option toTokenizer
(constructor andsetSource()
method)readSequenceFallback
) and selector (readSelectorSequenceFallback
) sequence readersAnPlusB
Selector
consumerv1.0.0-alpha15
Compare Source
atruleExpression
contextkeyword()
andproperty()
property()
to not lowercase custom property namesvariable
boolean flag inproperty()
resultscanner
intotokenizer
syntax
intolexer
docs/*.html
files to csstree/docs repoelement()
function forValue
context (-moz-element()
supported as well)Universal
node type intoType
Id
->IdSelector
Class
->ClassSelector
Type
->TypeSelector
Attribute
->AttributeSelector
PseudoClass
->PseudoClassSelector
PseudoElement
->PseudoElementSelector
Hash
->HexColor
Space
->WhiteSpace
An+B
->AnPlusB
Progid
node typeMediaQuery
consumer to not validate syntax on parse and to include whitespaces in children sequence as isWhiteSpace.value
property to store whitespace sequencefalse
some part of CSS represents as balancedRaw
):parseAtruleExpression
– to parse at-rule expressions (true
by default)parseSelector
– to parse rule's selector (true
by default)parseValue
- to parse declaration's value (true
by default)parseCustomProperty
– to parse value and fallback of custom property (false
by default)v1.0.0-alpha14
Compare Source
DeclarationList
,MediaQueryList
,MediaQuery
,MediaFeature
andRatio
node typesdeclarationList
context (useful to parse HTMLstyle
attribute content)@import
,@media
,@page
and@supports
at-rulesatrule
option forparse()
config, is used foratruleExpession
context to specify custom consumer for at-rule if anyScanner#skipWS()
,Scanner#eatNonWS()
,Scanner#consume()
andScanner#consumeNonWS()
helper methodsRaw
PseudoElement
to be a functional-pseudo (#33)Atrule.block
to contain aBlock
node type only if anyBlock.loc
positions to include curly bracketsAtrule.expression
to store anull
if no expressionStyleSheet
node type only for top level node (when context isstylesheet
, that's by default)Parentheses
,Brackets
andFunction
consumers to use passed sequence reader instead of its ownValue
andAtruleExpression
consumers to use common sequence reader (that reader was used byValue
consumer before)Comma
Raw
var()
fallback value as balancedRaw
var()
starts with double dashNth
to have aloc
propertySelectorList.loc
andSelector.loc
positions to exclude spacesdefault-syntax.json
is not found error (#32, @philschatz)Type
selector starting with dash (parser throws an error in this case now)Rule
(not sure if it's correct but looks reasonable)>>
combinator support until any browser support (no signals about that yet)PseudoElement.legacy
property:before
,:after
,:first-letter
and:first-line
to represent them asPseudoElement
, now those pseudos are represented asPseudoClass
nodesSyntax#match()
methodv1.0.0-alpha13
Compare Source
SyntaxMatchError
mismatchOffset
offset
property to store bad node offset in source CSS if anyloc
property that stores bad nodeloc
if anyv1.0.0-alpha12
Compare Source
Syntax#matchProperty()
method to always return a positive result for custom properties since syntax is never defined for them (#31)fromPlainObject()
andtoPlainObject()
to convert plain object to AST or AST to plain object (currently convertsList
<->Array
)v1.0.0-alpha11
Compare Source
:matches(<selector-list>)
(#28):has(<relative-selector-list>)
::slotted(<compound-selector>)
Brackets
node typeSelector
node type toSelectorList
SimpleSelector
node type toSelector
UnicodeRange.name
property toUnicodeRange.value
Negation
node type for regularPseudoClass
children
now:StyleSheet.rules
->StyleSheet.children
SelectorList.selectors
->SelectorList.children
Block.declarations
->Block.children
*.sequence
->*.children
Hex
andUnicodeRange
when number not an integernth-
pseudos parsingAn+B
node type to represent expressions like2n + 1
or-3n
a
orb
is not an integerodd
andeven
keywords processing, keywords are storing asIdentifier
node type nowNth
node type format to store anth
-query and an optionalselector
of
clause fornth-
pseudos (a.e.:nth-child(2n + 1 of li, img)
)Nth
parsing rules to:nth-child()
,:nth-last-child()
,:nth-of-type()
and:nth-last-of-type()
pseudosinfo
node property toloc
loc
to storestart
andend
positionsv1.0.0-alpha10
Compare Source
Scanner
to be a single point to its functionalityScanner
class to be useful for external projectswalk()
function behaviour to traverse AST nodes in natural orderwalkUp()
function to traverse AST nodes from deepest to parent (behaves aswalk()
before)Renovate configuration
📅 Schedule: At any time (no schedule defined).
🚦 Automerge: Disabled by config. Please merge this manually once you are satisfied.
♻️ Rebasing: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.
🔕 Ignore: Close this PR and you won't be reminded about this update again.
This PR has been generated by WhiteSource Renovate. View repository job log here.