fix(deps): update dependency css-tree to v3 #625
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.1.3
->^3.0.0
Release Notes
csstree/csstree (css-tree)
v3.0.0
Compare Source
@container
at-rule@starting-style
at-rule@scope
at-rule@position-try
at-rule@layer
at-rulelayer
,layer()
andsupports()
in the@media
at-rule (according to the @import rule in Cascading and Inheritance 5)Layer
andLayerList
node typesTokenStream#lookupTypeNonSC()
method<dashed-ident>
to generic typesmdn/data
to2.10.0
<'font'>
to CSS Fonts 4<color>
to CSS Color 5Object.prototype
is extended or polluted (#262)fork()
method to consider thegeneric
option when creating a Lexer instance (#266)line
oroffset
is specified via options (#251)speak
syntax patch (#241):lang()
to accept a list of<ident>
or<string>
per spec (#265)<'property'>
, when the syntax has a top-level#
-multiplier (#102)parseWithFallback()
to rollbacktokenIndex
before calling a fallbackBlock
to not include{
and}
Atrule
andRule
to include{
and}
for a blockRatio
parsing:Ratio
can be omitted. While this can't be a parser output (which would produce aNumber
node), it's feasible duringRatio
node construction or transformation.Added new node types:
Feature
: represents features like(feature)
and(feature: value)
, fundamental for both@media
and@container
at-rulesFeatureRange
: represents features in a range contextFeatureFunction
: represents functional features such as@supports
'sselector()
or@container
'sstyle()
Condition
: used across all query-like at-rules, encapsulating queries with features and thenot
,and
, andor
operatorsGeneralEnclosure
: represents the<general-enclosed>
production, which caters to unparsed parentheses or functional expressionsAdded support for functions for features and features in a range context, e.g.
(width: calc(100cm / 6))
Added a
condition
value for the parser's context option to parse queries. Use thekind
option to specify the condition type, e.g.,parse('...', { context: 'condition', kind: 'media' })
.Introduced a
features
section in the syntax configuration for defining functional features of at-rules. Expand definitions using thefork()
method. The current definition is as follows:Changes for
@media
at-rule:GeneralEnclosed
.(width > 100px)
or(100px < height < 400px)
MediaFeature
node type to theFeature
node type withkind: "media"
.MediaQuery
node structure into the following form:Changes for
@supports
at-rule:GeneralEnclosed
.(width > 100px)
or(100px < height < 400px)
SupportsDeclaration
node type to encapsulate a declaration in a query, replacingParentheses
.Condition
orSupportsDeclaration
nodes of kindsupports
instead ofParentheses
.selector()
feature via theFeatureFunction
node (configured infeatures.supports.selector
).v2.3.1
Compare Source
:host
,:host()
and:host-context()
pseudo class support (#216)generator
,parse
andparse-selector
entry points by adding missedNestedSelector
node typev2.3.0
Compare Source
NestingSelector
node type for&
(a nesting selector) in selectors@nest
at-rule@media
inside aRule
to parse its block content as aDeclaration
firstDeclarationList
behaviour to follow the rules forRule
's blockLexer#units
dictionary to provide unit groups (length
,angle
, etc.) used for matchingconfig.units
to override default unitsmdn-data
to2.0.30
v2.2.1
Compare Source
2.2.0
for at-rule syntax matching when at-rule has no preludev2.2.0
Compare Source
mdn-data
to2.0.28
revert
andrevert-layer
expression()
the same way as CSS wide keywordsbackground-clip
property definition to match Backgrounds and Borders 4 (#190)content
property definition to allowattr()
(#201)<delim-token>
@page
at-rule (#191)rex
,cap
,rcap
,rch
,ic
,ric
,lh
,rlh
,vi
,vb
,sv*
,lv*
,dv*
cqw
,cqh
,cqi
,cqb
,cqmin
,cqmax
vm
unit (supposed to be an old IE versions supported this unit instead ofvmax
)+#
and#?
according to spec (#199)[-∞,∞]
rangesv2.1.0
Compare Source
mdn-data
to2.0.27
module
field topackage.json
css-tree/utils
export (#181)css-tree/convertor
exportcss-tree/selector-parser
export (~27kb when bundled, #183)css-tree/parser
50kb -> 41kbcss-tree/generator
46kb -> 23kbsyntaxes
intotypes
incss-tree/definition-syntax-data-patch
:is()
,:-moz-any()
,:-webkit-any()
and:where()
(#182, #184)v2.0.4
Compare Source
^10
generate()
in safe mode to add a whitespace between<dimension-token>
and<hash-token>
, otherwise some values are broken in IE11, e.g.border
properties (#173):
for an attribute name onAttributeSelector
parsing as it does not meet the CSS specs (details)v2.0.3
Compare Source
generate()
insafe
mode betweentype-selector
andid-selector
(e.g.a#id
). A regression was introduces in2.0.2
since IE11 fails on values when<hash-token>
goes after<ident-token>
without a whitespace in the middle, e.g.1px solid#000
. Thus, in one case, a space between the<ident-token>
and the<hash-token>
is required, and in the other, vice versa. Until a better solution found, a workaround is used onid-selector
generation by producing a<delim-token>
instead of<hash-token>
.v2.0.2
Compare Source
width
,min-width
andmax-width
syntax definitionsmdn-data
source-map
withsource-map-js
which reduce install size by ~700KBcalc()
function consumption on definition syntax matchinggenerate()
auto emitting a whitespace edge cases when next token starts with a dash (minus)generate()
safe mode to cover more cases for IE11dist/data.cjs
anddist/version.cjs
css-tree/definition-syntax-data
css-tree/definition-syntax-data-patch
v2.0.1
Compare Source
^12.20.0
and^14.13.0
versionsv2.0.0
Compare Source
^10 || ^12.20.0 || ^14.13.0 || >=15.0.0
)import * as parser from "css-tree/parser"
orrequire("css-tree/parser")
):css-tree/tokenizer
css-tree/parser
css-tree/walker
css-tree/generator
css-tree/lexer
css-tree/definition-syntax
css-tree/utils
dist/csstree.js
(an IIFE version withcsstree
as a global name) anddist/csstree.esm.js
(as ES module). Both are minifiedmdn-data
to2.0.23
tokenize()
to take a function as second argument, which will be called for every token. No stream instance is creating when second argument is ommited.TokenStream#getRawLength()
to take second parameter as a function (rule) that check a char code to stop a scanningTokenStream#forEachToken(fn)
methodTokenStream#skipWS()
methodTokenStream#getTokenLength()
methodSyntaxError
(custom parser's error class) from root of public API to parser viaparse.SyntaxError
parseError
field in parser'sSyntaxError
{ type: 'Combinator', name: ' ' }
node instead ofWhiteSpace
nodeWhiteSpace
nodes with the single exception for a custom property declaration with a single white space token as a value+
and-
operators, when a whitespace is before and/or after an operatorparse.config
consumeUntilBalanceEnd()
,consumeUntilLeftCurlyBracket()
,consumeUntilLeftCurlyBracketOrSemicolon()
,consumeUntilExclamationMarkOrSemicolon()
andconsumeUntilSemicolonIncluded()
methods to parser's inner API to use withRaw
instead ofRaw.mode
Nth
to always consumeof
clause when presented, so it became more general and moves validation to lexerString
node type to store decoded string value, i.e. with no quotes and escape sequencesUrl
node type to store decoded url value as a string instead ofString
orRaw
node, i.e. with no quotes, escape sequences andurl()
wrapperchunk()
handler totoken()
(output a single token) andtokenize()
(split a string into tokens and output each of them)mode
option forgenerate()
to specify a mode of token separation:spec
orsafe
(by default)emit(token, type, auto)
handler as implementation specific token processorNth
to serialize+n
asn
string
andurl
tokens on serializationLexer#matchDeclaration()
methodident
,string
andurl
helpers to decode/encode corresponding values, e.g.url.decode('url("image.jpg")')
==='image.jpg'
List
to be iterable (iterates data)List#first
,List#last
andList#isEmpty
to gettersList#getSize()
method toList#size
getterList#each()
andList#eachRight()
methods,List#forEach()
andList#forEachRight()
should be used insteadConfiguration
📅 Schedule: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined).
🚦 Automerge: Disabled by config. Please merge this manually once you are satisfied.
♻ Rebasing: Never, or you tick the rebase/retry checkbox.
🔕 Ignore: Close this PR and you won't be reminded about this update again.
This PR was generated by Mend Renovate. View the repository job log.