
\begin{DoxyItemize}
\item Fixed\+: ts errors
\end{DoxyItemize}\hypertarget{md_sfcode_node_modules_postcss_selector_parser_CHANGELOG_autotoc_md22145}{}\doxysection{6.\+0.\+3}\label{md_sfcode_node_modules_postcss_selector_parser_CHANGELOG_autotoc_md22145}

\begin{DoxyItemize}
\item Fixed\+: replace node built-\/in \char`\"{}util\char`\"{} module with \char`\"{}util-\/deprecate\char`\"{}
\item Fixed\+: handle uppercase pseudo elements
\item Fixed\+: do not create invalid combinator before comment
\end{DoxyItemize}\hypertarget{md_sfcode_node_modules_postcss_selector_parser_CHANGELOG_autotoc_md22146}{}\doxysection{6.\+0.\+2}\label{md_sfcode_node_modules_postcss_selector_parser_CHANGELOG_autotoc_md22146}

\begin{DoxyItemize}
\item Fixed an issue with parsing and stringifying an empty attribute value
\end{DoxyItemize}\hypertarget{md_sfcode_node_modules_postcss_selector_parser_CHANGELOG_autotoc_md22147}{}\doxysection{6.\+0.\+1}\label{md_sfcode_node_modules_postcss_selector_parser_CHANGELOG_autotoc_md22147}

\begin{DoxyItemize}
\item Fixed an issue with unicode surrogate pair parsing
\end{DoxyItemize}\hypertarget{md_sfcode_node_modules_postcss_selector_parser_CHANGELOG_autotoc_md22148}{}\doxysection{6.\+0.\+0}\label{md_sfcode_node_modules_postcss_selector_parser_CHANGELOG_autotoc_md22148}

\begin{DoxyItemize}
\item Updated\+: {\ttfamily cssesc} to 3.\+0.\+0 (major)
\item Fixed\+: Issues with escaped {\ttfamily id} and {\ttfamily class} selectors
\end{DoxyItemize}\hypertarget{md_sfcode_node_modules_postcss_selector_parser_CHANGELOG_autotoc_md22149}{}\doxysection{5.\+0.\+0}\label{md_sfcode_node_modules_postcss_selector_parser_CHANGELOG_autotoc_md22149}

\begin{DoxyItemize}
\item Allow escaped dot within class name.
\item Update Post\+CSS to 7.\+0.\+7 (patch)
\end{DoxyItemize}\hypertarget{md_sfcode_node_modules_postcss_selector_parser_CHANGELOG_autotoc_md22150}{}\doxysection{5.\+0.\+0-\/rc.\+4}\label{md_sfcode_node_modules_postcss_selector_parser_CHANGELOG_autotoc_md22150}

\begin{DoxyItemize}
\item Fixed an issue where comments immediately after an insensitive (in attribute) were not parsed correctly.
\item Updated {\ttfamily cssesc} to 2.\+0.\+0 (major).
\item Removed outdated integration tests.
\item Added tests for custom selectors, tags with attributes, the universal selector with pseudos, and tokens after combinators.
\end{DoxyItemize}\hypertarget{md_sfcode_node_modules_postcss_selector_parser_CHANGELOG_autotoc_md22151}{}\doxysection{5.\+0.\+0-\/rc.\+1}\label{md_sfcode_node_modules_postcss_selector_parser_CHANGELOG_autotoc_md22151}
To ease adoption of the v5.\+0 release, we have relaxed the node version check performed by npm at installation time to allow for node 4, which remains officially unsupported, but likely to continue working for the time being.\hypertarget{md_sfcode_node_modules_postcss_selector_parser_CHANGELOG_autotoc_md22152}{}\doxysection{5.\+0.\+0-\/rc.\+0}\label{md_sfcode_node_modules_postcss_selector_parser_CHANGELOG_autotoc_md22152}
This release has {\bfseries{BREAKING CHANGES}} that were required to fix regressions in 4.\+0.\+0 and to make the Combinator Node API consistent for all combinator types. Please read carefully.\hypertarget{md_sfcode_node_modules_postcss_selector_parser_CHANGELOG_autotoc_md22153}{}\doxysubsection{Summary of Changes}\label{md_sfcode_node_modules_postcss_selector_parser_CHANGELOG_autotoc_md22153}

\begin{DoxyItemize}
\item The way a descendent combinator that isn\textquotesingle{}t a single space character (E.\+g. {\ttfamily .a .b}) is stored in the AST has changed.
\item Named Combinators (E.\+g. {\ttfamily .a /for/ .b}) are now properly parsed as a combinator.
\item It is now possible to look up a node based on the source location of a character in that node and to query nodes if they contain some character.
\item Several bug fixes that caused the parser to hang and run out of memory when a {\ttfamily /} was encountered have been fixed.
\item The minimum supported version of Node is now {\ttfamily v6.\+0.\+0}.
\end{DoxyItemize}\hypertarget{md_sfcode_node_modules_postcss_selector_parser_CHANGELOG_autotoc_md22154}{}\doxysubsubsection{Changes to the Descendent Combinator}\label{md_sfcode_node_modules_postcss_selector_parser_CHANGELOG_autotoc_md22154}
In prior releases, the value of a descendant combinator with multiple spaces included all the spaces.


\begin{DoxyItemize}
\item {\ttfamily .a .b}\+: Extra spaces are now stored as space before.
\begin{DoxyItemize}
\item Old \& Busted\+:
\begin{DoxyItemize}
\item {\ttfamily combinator.\+value === \char`\"{}   \char`\"{}}
\end{DoxyItemize}
\item New hotness\+:
\begin{DoxyItemize}
\item {\ttfamily combinator.\+value === \char`\"{} \char`\"{} \&\& combinator.\+spaces.\+before === \char`\"{}  \char`\"{}}
\end{DoxyItemize}
\end{DoxyItemize}
\item {\ttfamily .a /$\ast$comment$\ast$/.b}\+: A comment at the end of the combinator causes extra space to become after space.
\begin{DoxyItemize}
\item Old \& Busted\+:
\begin{DoxyItemize}
\item {\ttfamily combinator.\+value === \char`\"{}   \char`\"{}}
\item {\ttfamily combinator.\+raws.\+value === \char`\"{}   /$\ast$comment/\char`\"{}}
\end{DoxyItemize}
\item New hotness\+:
\begin{DoxyItemize}
\item {\ttfamily combinator.\+value === \char`\"{} \char`\"{}}
\item {\ttfamily combinator.\+spaces.\+after === \char`\"{}  \char`\"{}}
\item {\ttfamily combinator.\+raws.\+spaces.\+after === \char`\"{}  /$\ast$comment$\ast$/\char`\"{}}
\end{DoxyItemize}
\end{DoxyItemize}
\item {\ttfamily .a$<$newline$>$.b}\+: whitespace that doesn\textquotesingle{}t start or end with a single space character is stored as a raw value.
\begin{DoxyItemize}
\item Old \& Busted\+:
\begin{DoxyItemize}
\item {\ttfamily combinator.\+value === \char`\"{}\textbackslash{}n\char`\"{}}
\item {\ttfamily combinator.\+raws.\+value === undefined}
\end{DoxyItemize}
\item New hotness\+:
\begin{DoxyItemize}
\item {\ttfamily combinator.\+value === \char`\"{} \char`\"{}}
\item {\ttfamily combinator.\+raws.\+value === \char`\"{}\textbackslash{}n\char`\"{}}
\end{DoxyItemize}
\end{DoxyItemize}
\end{DoxyItemize}\hypertarget{md_sfcode_node_modules_postcss_selector_parser_CHANGELOG_autotoc_md22155}{}\doxysubsubsection{Support for \char`\"{}\+Named Combinators\char`\"{}}\label{md_sfcode_node_modules_postcss_selector_parser_CHANGELOG_autotoc_md22155}
Although, nonstandard and unlikely to ever become a standard, combinators like {\ttfamily /deep/} and {\ttfamily /for/} are now properly supported.

Because they\textquotesingle{}ve been taken off the standardization track, there is no spec-\/official name for combinators of the form {\ttfamily /$<$ident$>$/}. However, I talked to \href{https://twitter.com/tabatkins}{\texttt{ Tab Atkins}} and we agreed to call them \char`\"{}named combinators\char`\"{} so now they are called that.

Before this release such named combinators were parsed without intention and generated three nodes of type {\ttfamily \char`\"{}tag\char`\"{}} where the first and last nodes had a value of {\ttfamily \char`\"{}/\char`\"{}}.


\begin{DoxyItemize}
\item {\ttfamily .a /for/ .b} is parsed as a combinator.
\begin{DoxyItemize}
\item Old \& Busted\+:
\begin{DoxyItemize}
\item {\ttfamily root.\+nodes\mbox{[}0\mbox{]}.nodes\mbox{[}1\mbox{]}.type === \char`\"{}tag\char`\"{}}
\item {\ttfamily root.\+nodes\mbox{[}0\mbox{]}.nodes\mbox{[}1\mbox{]}.value === \char`\"{}/\char`\"{}}
\end{DoxyItemize}
\item New hotness\+:
\begin{DoxyItemize}
\item {\ttfamily root.\+nodes\mbox{[}0\mbox{]}.nodes\mbox{[}1\mbox{]}.type === \char`\"{}combinator\char`\"{}}
\item {\ttfamily root.\+nodes\mbox{[}0\mbox{]}.nodes\mbox{[}1\mbox{]}.value === \char`\"{}/for/\char`\"{}}
\end{DoxyItemize}
\end{DoxyItemize}
\item {\ttfamily .a /F\textbackslash{}6f\+R/ .b} escapes are handled and uppercase is normalized.
\begin{DoxyItemize}
\item Old \& Busted\+:
\begin{DoxyItemize}
\item {\ttfamily root.\+nodes\mbox{[}0\mbox{]}.nodes\mbox{[}2\mbox{]}.type === \char`\"{}tag\char`\"{}}
\item {\ttfamily root.\+nodes\mbox{[}0\mbox{]}.nodes\mbox{[}2\mbox{]}.value === \char`\"{}\+F\textbackslash{}\textbackslash{}6f\+R\char`\"{}}
\end{DoxyItemize}
\item New hotness\+:
\begin{DoxyItemize}
\item {\ttfamily root.\+nodes\mbox{[}0\mbox{]}.nodes\mbox{[}1\mbox{]}.type === \char`\"{}combinator\char`\"{}}
\item {\ttfamily root.\+nodes\mbox{[}0\mbox{]}.nodes\mbox{[}1\mbox{]}.value === \char`\"{}/for/\char`\"{}}
\item {\ttfamily root.\+nodes\mbox{[}0\mbox{]}.nodes\mbox{[}1\mbox{]}.raws.\+value === \char`\"{}/\+F\textbackslash{}\textbackslash{}6f\+R/\char`\"{}}
\end{DoxyItemize}
\end{DoxyItemize}
\end{DoxyItemize}\hypertarget{md_sfcode_node_modules_postcss_selector_parser_CHANGELOG_autotoc_md22156}{}\doxysubsubsection{Source position checks and lookups}\label{md_sfcode_node_modules_postcss_selector_parser_CHANGELOG_autotoc_md22156}
A new API was added to look up a node based on the source location.


\begin{DoxyCode}{0}
\DoxyCodeLine{const selectorParser = require("{}postcss-\/selector-\/parser"{});}
\DoxyCodeLine{// You can find the most specific node for any given character}
\DoxyCodeLine{let combinator = selectorParser.astSync("{}.a > .b"{}).atPosition(1,4);}
\DoxyCodeLine{combinator.toString() === "{} > "{};}
\DoxyCodeLine{// You can check if a node includes a specific character}
\DoxyCodeLine{// Whitespace surrounding the node that is owned by that node}
\DoxyCodeLine{// is included in the check.}
\DoxyCodeLine{[2,3,4,5,6].map(column => combinator.isAtPosition(1, column));}
\DoxyCodeLine{// => [false, true, true, true, false] }

\end{DoxyCode}
\hypertarget{md_sfcode_node_modules_postcss_selector_parser_CHANGELOG_autotoc_md22157}{}\doxysection{4.\+0.\+0}\label{md_sfcode_node_modules_postcss_selector_parser_CHANGELOG_autotoc_md22157}
This release has {\bfseries{BREAKING CHANGES}} that were required to fix bugs regarding values with escape sequences. Please read carefully.


\begin{DoxyItemize}
\item {\bfseries{Identifiers with escapes}} -\/ CSS escape sequences are now hidden from the public API by default. The normal value of a node like a class name or ID, or an aspect of a node such as attribute selector\textquotesingle{}s value, is unescaped. Escapes representing Non-\/ascii characters are unescaped into unicode characters. For example\+: {\ttfamily bu\textbackslash{}tton, .\textbackslash{}31 00, \#i\textbackslash{}2764\textbackslash{}FE0\+Fu, \mbox{[}attr=\char`\"{}value is \textbackslash{}\char`\"{}quoted"{}\char`\"{}\mbox{]}$<$/tt$>$   will parse respectively to the values $<$tt$>$button$<$/tt$>$, $<$tt$>$100$<$/tt$>$, $<$tt$>$i❤️u$<$/tt$>$, $<$tt$>$value is \char`\"{}quoted"{}}. The original escape sequences for these values can be found in the corresponding property name in {\ttfamily node.\+raws}. Where possible, deprecation warnings were added, but the nature of escape handling makes it impossible to detect what is escaped or not. Our expectation is that most users are neither expecting nor handling escape sequences in their use of this library, and so for them, this is a bug fix. Users who are taking care to handle escapes correctly can now update their code to remove the escape handling and let us do it for them.
\item {\bfseries{Mutating values with escapes}} -\/ When you make an update to a node property that has escape handling The value is assumed to be unescaped, and any special characters are escaped automatically and the corresponding {\ttfamily raws} value is immediately updated. This can result in changes to the original escape format. Where the exact value of the escape sequence is important there are methods that allow both values to be set in conjunction. There are a number of new convenience methods for manipulating values that involve escapes, especially for attributes values where the quote mark is involved. See \href{https://github.com/postcss/postcss-selector-parser/pull/133}{\texttt{ https\+://github.\+com/postcss/postcss-\/selector-\/parser/pull/133}} for an extensive write-\/up on these changes.
\end{DoxyItemize}

{\bfseries{Upgrade/\+API Example}}

In {\ttfamily 3.\+x} there was no unescape handling and internal consistency of several properties was the caller\textquotesingle{}s job to maintain. It was very easy for the developer to create a CSS file that did not parse correctly when some types of values were in use.


\begin{DoxyCode}{0}
\DoxyCodeLine{const selectorParser = require("{}postcss-\/selector-\/parser"{});}
\DoxyCodeLine{let attr = selectorParser.attribute(\{attribute: "{}id"{}, operator: "{}="{}, value: "{}a-\/value"{}\});}
\DoxyCodeLine{attr.value; // => "{}a-\/value"{}}
\DoxyCodeLine{attr.toString(); // => [id=a-\/value]}
\DoxyCodeLine{// Add quotes to an attribute's value.}
\DoxyCodeLine{// All these values have to be set by the caller to be consistent:}
\DoxyCodeLine{// no internal consistency is maintained.}
\DoxyCodeLine{attr.raws.unquoted = attr.value}
\DoxyCodeLine{attr.value = "{}'"{} + attr.value + "{}'"{};}
\DoxyCodeLine{attr.value; // => "{}'a-\/value'"{}}
\DoxyCodeLine{attr.quoted = true;}
\DoxyCodeLine{attr.toString();  // => "{}[id='a-\/value']"{} }

\end{DoxyCode}


In {\ttfamily 4.\+0} there is a convenient API for setting and mutating values that may need escaping. Especially for attributes.


\begin{DoxyCode}{0}
\DoxyCodeLine{const selectorParser = require("{}postcss-\/selector-\/parser"{});}
\DoxyCodeLine{}
\DoxyCodeLine{// The constructor requires you specify the exact escape sequence}
\DoxyCodeLine{let className = selectorParser.className(\{value: "{}illegal class name"{}, raws: \{value: "{}illegal\(\backslash\)\(\backslash\) class\(\backslash\)\(\backslash\) name"{}\}\});}
\DoxyCodeLine{className.toString(); // => '.illegal\(\backslash\)\(\backslash\) class\(\backslash\)\(\backslash\) name'}
\DoxyCodeLine{}
\DoxyCodeLine{// So it's better to set the value as a property}
\DoxyCodeLine{className = selectorParser.className();}
\DoxyCodeLine{// Most properties that deal with identifiers work like this}
\DoxyCodeLine{className.value = "{}escape for me"{};}
\DoxyCodeLine{className.value; // => 'escape for me'}
\DoxyCodeLine{className.toString(); // => '.escape\(\backslash\)\(\backslash\) for\(\backslash\)\(\backslash\) me'}
\DoxyCodeLine{}
\DoxyCodeLine{// emoji and all non-\/ascii are escaped to ensure it works in every css file.}
\DoxyCodeLine{className.value = "{}😱🦄😍"{};}
\DoxyCodeLine{className.value; // => '😱🦄😍'}
\DoxyCodeLine{className.toString(); // => '.\(\backslash\)\(\backslash\)1F631\(\backslash\)\(\backslash\)1F984\(\backslash\)\(\backslash\)1F60D'}
\DoxyCodeLine{}
\DoxyCodeLine{// you can control the escape sequence if you want, or do bad bad things}
\DoxyCodeLine{className.setPropertyAndEscape('value', 'xxxx', 'yyyy');}
\DoxyCodeLine{className.value; // => "{}xxxx"{}}
\DoxyCodeLine{className.toString(); // => "{}.yyyy"{}}
\DoxyCodeLine{}
\DoxyCodeLine{// Pass a value directly through to the css output without escaping it. }
\DoxyCodeLine{className.setPropertyWithoutEscape('value', '\$REPLACE\_ME\$');}
\DoxyCodeLine{className.value; // => "{}\$REPLACE\_ME\$"{}}
\DoxyCodeLine{className.toString(); // => "{}.\$REPLACE\_ME\$"{}}
\DoxyCodeLine{}
\DoxyCodeLine{// The biggest changes are to the Attribute class}
\DoxyCodeLine{// passing quoteMark explicitly is required to avoid a deprecation warning.}
\DoxyCodeLine{let attr = selectorParser.attribute(\{attribute: "{}id"{}, operator: "{}="{}, value: "{}a-\/value"{}, quoteMark: null\});}
\DoxyCodeLine{attr.toString(); // => "{}[id=a-\/value]"{}}
\DoxyCodeLine{// Get the value with quotes on it and any necessary escapes.}
\DoxyCodeLine{// This is the same as reading attr.value in 3.x.}
\DoxyCodeLine{attr.getQuotedValue(); // => "{}a-\/value"{};}
\DoxyCodeLine{attr.quoteMark; // => null}
\DoxyCodeLine{}
\DoxyCodeLine{// Add quotes to an attribute's value.}
\DoxyCodeLine{attr.quoteMark = "{}'"{}; // This is all that's required.}
\DoxyCodeLine{attr.toString(); // => "{}[id='a-\/value']"{}}
\DoxyCodeLine{attr.quoted; // => true}
\DoxyCodeLine{// The value is still the same, only the quotes have changed.}
\DoxyCodeLine{attr.value; // => a-\/value}
\DoxyCodeLine{attr.getQuotedValue(); // => "{}'a-\/value'"{};}
\DoxyCodeLine{}
\DoxyCodeLine{// deprecated assignment, no warning because there's no escapes}
\DoxyCodeLine{attr.value = "{}new-\/value"{};}
\DoxyCodeLine{// no quote mark is needed so it is removed}
\DoxyCodeLine{attr.getQuotedValue(); // => "{}new-\/value"{};}
\DoxyCodeLine{}
\DoxyCodeLine{// deprecated assignment, }
\DoxyCodeLine{attr.value = "{}\(\backslash\)"{}a 'single quoted' value\(\backslash\)"{}"{};}
\DoxyCodeLine{// > (node:27859) DeprecationWarning: Assigning an attribute a value containing characters that might need to be escaped is deprecated. Call attribute.setValue() instead.}
\DoxyCodeLine{attr.getQuotedValue(); // => '"{}a \(\backslash\)'single quoted\(\backslash\)' value"{}';}
\DoxyCodeLine{// quote mark inferred from first and last characters.}
\DoxyCodeLine{attr.quoteMark; // => '"{}'}
\DoxyCodeLine{}
\DoxyCodeLine{// setValue takes options to make manipulating the value simple.}
\DoxyCodeLine{attr.setValue('foo', \{smart: true\});}
\DoxyCodeLine{// foo doesn't require any escapes or quotes.}
\DoxyCodeLine{attr.toString(); // => '[id=foo]'}
\DoxyCodeLine{attr.quoteMark; // => null }
\DoxyCodeLine{}
\DoxyCodeLine{// An explicit quote mark can be specified}
\DoxyCodeLine{attr.setValue('foo', \{quoteMark: '"{}'\});}
\DoxyCodeLine{attr.toString(); // => '[id="{}foo"{}]'}
\DoxyCodeLine{}
\DoxyCodeLine{// preserves quote mark by default}
\DoxyCodeLine{attr.setValue('bar');}
\DoxyCodeLine{attr.toString(); // => '[id="{}bar"{}]'}
\DoxyCodeLine{attr.quoteMark = null;}
\DoxyCodeLine{attr.toString(); // => '[id=bar]'}
\DoxyCodeLine{}
\DoxyCodeLine{// with no arguments, it preserves quote mark even when it's not a great idea}
\DoxyCodeLine{attr.setValue('a value \(\backslash\)n that should be quoted');}
\DoxyCodeLine{attr.toString(); // => '[id=a\(\backslash\)\(\backslash\) value\(\backslash\)\(\backslash\) \(\backslash\)\(\backslash\)A\(\backslash\)\(\backslash\) that\(\backslash\)\(\backslash\) should\(\backslash\)\(\backslash\) be\(\backslash\)\(\backslash\) quoted]'}
\DoxyCodeLine{}
\DoxyCodeLine{// smart preservation with a specified default}
\DoxyCodeLine{attr.setValue('a value \(\backslash\)n that should be quoted', \{smart: true, preferCurrentQuoteMark: true, quoteMark: "{}'"{}\});}
\DoxyCodeLine{// => "{}[id='a value \(\backslash\)\(\backslash\)A  that should be quoted']"{}}
\DoxyCodeLine{attr.quoteMark = '"{}';}
\DoxyCodeLine{// => '[id="{}a value \(\backslash\)\(\backslash\)A  that should be quoted"{}]'}
\DoxyCodeLine{}
\DoxyCodeLine{// this keeps double quotes because it wants to quote the value and the existing value has double quotes.}
\DoxyCodeLine{attr.setValue('this should be quoted', \{smart: true, preferCurrentQuoteMark: true, quoteMark: "{}'"{}\});}
\DoxyCodeLine{// => '[id="{}this should be quoted"{}]'}
\DoxyCodeLine{}
\DoxyCodeLine{// picks single quotes because the value has double quotes}
\DoxyCodeLine{attr.setValue('a "{}double quoted"{} value', \{smart: true, preferCurrentQuoteMark: true, quoteMark: "{}'"{}\});}
\DoxyCodeLine{// => "{}[id='a "{}double quoted"{} value']"{}}
\DoxyCodeLine{}
\DoxyCodeLine{// setPropertyAndEscape lets you do anything you want. Even things that are a bad idea and illegal.}
\DoxyCodeLine{attr.setPropertyAndEscape('value', 'xxxx', 'the password is 42');}
\DoxyCodeLine{attr.value; // => "{}xxxx"{}}
\DoxyCodeLine{attr.toString(); // => "{}[id=the password is 42]"{}}
\DoxyCodeLine{}
\DoxyCodeLine{// Pass a value directly through to the css output without escaping it. }
\DoxyCodeLine{attr.setPropertyWithoutEscape('value', '\$REPLACEMENT\$');}
\DoxyCodeLine{attr.value; // => "{}\$REPLACEMENT\$"{}}
\DoxyCodeLine{attr.toString(); // => "{}[id=\$REPLACEMENT\$]"{} }

\end{DoxyCode}
\hypertarget{md_sfcode_node_modules_postcss_selector_parser_CHANGELOG_autotoc_md22158}{}\doxysection{3.\+1.\+2}\label{md_sfcode_node_modules_postcss_selector_parser_CHANGELOG_autotoc_md22158}

\begin{DoxyItemize}
\item Fix\+: Removed dot-\/prop dependency since it\textquotesingle{}s no longer written in es5.
\end{DoxyItemize}\hypertarget{md_sfcode_node_modules_postcss_selector_parser_CHANGELOG_autotoc_md22159}{}\doxysection{3.\+1.\+1}\label{md_sfcode_node_modules_postcss_selector_parser_CHANGELOG_autotoc_md22159}

\begin{DoxyItemize}
\item Fix\+: typescript definitions weren\textquotesingle{}t in the published package.
\end{DoxyItemize}\hypertarget{md_sfcode_node_modules_postcss_selector_parser_CHANGELOG_autotoc_md22160}{}\doxysection{3.\+1.\+0}\label{md_sfcode_node_modules_postcss_selector_parser_CHANGELOG_autotoc_md22160}

\begin{DoxyItemize}
\item Fixed numerous bugs in attribute nodes relating to the handling of comments and whitespace. There\textquotesingle{}s significant changes to {\ttfamily attr\+Node.\+spaces} and {\ttfamily attr\+Node.\+raws} since the {\ttfamily 3.\+0.\+0} release.
\item Added {\ttfamily Attribute\#offset\+Of(part)} to get the offset location of attribute parts like {\ttfamily \char`\"{}operator\char`\"{}} and {\ttfamily \char`\"{}value\char`\"{}}. This is most often added to {\ttfamily Attribute\#source\+Index} for error reporting.
\end{DoxyItemize}\hypertarget{md_sfcode_node_modules_postcss_selector_parser_CHANGELOG_autotoc_md22161}{}\doxysection{3.\+0.\+0}\label{md_sfcode_node_modules_postcss_selector_parser_CHANGELOG_autotoc_md22161}
\hypertarget{md_sfcode_node_modules_postcss_selector_parser_CHANGELOG_autotoc_md22162}{}\doxysubsection{Breaking changes}\label{md_sfcode_node_modules_postcss_selector_parser_CHANGELOG_autotoc_md22162}

\begin{DoxyItemize}
\item Some tweaks to the tokenizer/attribute selector parsing mean that whitespace locations might be slightly different to the 2.\+x code.
\item Better attribute selector parsing with more validation; postcss-\/selector-\/parser no longer uses regular expressions to parse attribute selectors.
\item Added an async API (thanks to @jacobp100); the default {\ttfamily process} API is now async, and the sync API is now accessed through {\ttfamily process\+Sync} instead.
\item {\ttfamily process()} and {\ttfamily process\+Sync()} now return a string instead of the Processor instance.
\item Tweaks handling of Less interpolation (thanks to @jwilsson).
\item Removes support for Node 0.\+12.
\end{DoxyItemize}\hypertarget{md_sfcode_node_modules_postcss_selector_parser_CHANGELOG_autotoc_md22163}{}\doxysubsection{Other changes}\label{md_sfcode_node_modules_postcss_selector_parser_CHANGELOG_autotoc_md22163}

\begin{DoxyItemize}
\item {\ttfamily ast()} and {\ttfamily ast\+Sync()} methods have been added to the {\ttfamily Processor}. These return the {\ttfamily Root} node of the selectors after processing them.
\item {\ttfamily transform()} and {\ttfamily transform\+Sync()} methods have been added to the {\ttfamily Processor}. These return the value returned by the processor callback after processing the selectors.
\item Set the parent when inserting a node (thanks to @chriseppstein).
\item Correctly adjust indices when using insert\+Before/insert\+After (thanks to @tivac).
\item Fixes handling of namespaces with qualified tag selectors.
\item {\ttfamily process}, {\ttfamily ast} and {\ttfamily transform} (and their sync variants) now accept a {\ttfamily postcss} rule node. When provided, better errors are generated and selector processing is automatically set back to the rule selector (unless the {\ttfamily update\+Selector} option is set to {\ttfamily false}.)
\item Now more memory efficient when tokenizing selectors.
\end{DoxyItemize}\hypertarget{md_sfcode_node_modules_postcss_selector_parser_CHANGELOG_autotoc_md22164}{}\doxysubsubsection{Upgrade hints}\label{md_sfcode_node_modules_postcss_selector_parser_CHANGELOG_autotoc_md22164}
The pattern of\+:

{\ttfamily rule.\+selector = processor.\+process(rule.\+selector).result.\+to\+String();}

is now\+:

{\ttfamily processor.\+process\+Sync(rule)}\hypertarget{md_sfcode_node_modules_postcss_selector_parser_CHANGELOG_autotoc_md22165}{}\doxysection{2.\+2.\+3}\label{md_sfcode_node_modules_postcss_selector_parser_CHANGELOG_autotoc_md22165}

\begin{DoxyItemize}
\item Resolves an issue where the parser would not reduce multiple spaces between an ampersand and another simple selector in lossy mode (thanks to @adam-\/26).
\end{DoxyItemize}\hypertarget{md_sfcode_node_modules_postcss_selector_parser_CHANGELOG_autotoc_md22166}{}\doxysection{2.\+2.\+2}\label{md_sfcode_node_modules_postcss_selector_parser_CHANGELOG_autotoc_md22166}

\begin{DoxyItemize}
\item No longer hangs on an unescaped semicolon; instead the parser will throw an exception for these cases.
\end{DoxyItemize}\hypertarget{md_sfcode_node_modules_postcss_selector_parser_CHANGELOG_autotoc_md22167}{}\doxysection{2.\+2.\+1}\label{md_sfcode_node_modules_postcss_selector_parser_CHANGELOG_autotoc_md22167}

\begin{DoxyItemize}
\item Allows a consumer to specify whitespace tokens when creating a new Node (thanks to @\+Semigradsky).
\end{DoxyItemize}\hypertarget{md_sfcode_node_modules_postcss_selector_parser_CHANGELOG_autotoc_md22168}{}\doxysection{2.\+2.\+0}\label{md_sfcode_node_modules_postcss_selector_parser_CHANGELOG_autotoc_md22168}

\begin{DoxyItemize}
\item Added a new option to normalize whitespace when parsing the selector string (thanks to @adam-\/26).
\end{DoxyItemize}\hypertarget{md_sfcode_node_modules_postcss_selector_parser_CHANGELOG_autotoc_md22169}{}\doxysection{2.\+1.\+1}\label{md_sfcode_node_modules_postcss_selector_parser_CHANGELOG_autotoc_md22169}

\begin{DoxyItemize}
\item Better unquoted value handling within attribute selectors (thanks to @evilebottnawi).
\end{DoxyItemize}\hypertarget{md_sfcode_node_modules_postcss_selector_parser_CHANGELOG_autotoc_md22170}{}\doxysection{2.\+1.\+0}\label{md_sfcode_node_modules_postcss_selector_parser_CHANGELOG_autotoc_md22170}

\begin{DoxyItemize}
\item Added\+: Use string constants for all node types \& expose them on the main parser instance (thanks to @\+Aweary).
\end{DoxyItemize}

\#~2.\+0.\+0

This release contains the following breaking changes\+:


\begin{DoxyItemize}
\item Renamed all {\ttfamily each\+Inside} iterators to {\ttfamily walk}. For example, {\ttfamily each\+Tag} is now {\ttfamily walk\+Tags}, and {\ttfamily each\+Inside} is now {\ttfamily walk}.
\item Renamed {\ttfamily Node\#remove\+Self()} to {\ttfamily Node\#remove()}.
\item Renamed {\ttfamily Container\#remove()} to {\ttfamily Container\#remove\+Child()}.
\item Renamed {\ttfamily Node\#raw} to {\ttfamily Node\#raws} (thanks to @davidtheclark).
\item Now parses {\ttfamily \&} as the {\itshape nesting} selector, rather than a {\itshape tag} selector.
\item Fixes misinterpretation of Sass interpolation (e.\+g. {\ttfamily \#\{foo\}}) as an id selector (thanks to @davidtheclark).
\end{DoxyItemize}

and;


\begin{DoxyItemize}
\item Fixes parsing of attribute selectors with equals signs in them (e.\+g. {\ttfamily \mbox{[}data-\/attr=\char`\"{}foo=bar\char`\"{}\mbox{]}}) (thanks to @montmanu).
\item Adds {\ttfamily quoted} and {\ttfamily raw.\+unquoted} properties to attribute nodes (thanks to @davidtheclark).
\end{DoxyItemize}\hypertarget{md_sfcode_node_modules_postcss_selector_parser_CHANGELOG_autotoc_md22171}{}\doxysection{1.\+3.\+3}\label{md_sfcode_node_modules_postcss_selector_parser_CHANGELOG_autotoc_md22171}

\begin{DoxyItemize}
\item Fixes an infinite loop on {\ttfamily )} and {\ttfamily \mbox{]}} tokens when they had no opening pairs. Now postcss-\/selector-\/parser will throw when it encounters these lone tokens.
\end{DoxyItemize}

\#~1.\+3.\+2


\begin{DoxyItemize}
\item Now uses plain integers rather than {\ttfamily str.\+char\+Code\+At(0)} for compiled builds.
\end{DoxyItemize}\hypertarget{md_sfcode_node_modules_postcss_selector_parser_CHANGELOG_autotoc_md22172}{}\doxysection{1.\+3.\+1}\label{md_sfcode_node_modules_postcss_selector_parser_CHANGELOG_autotoc_md22172}

\begin{DoxyItemize}
\item Update flatten to v1.\+x (thanks to @shinnn).
\end{DoxyItemize}\hypertarget{md_sfcode_node_modules_postcss_selector_parser_CHANGELOG_autotoc_md22173}{}\doxysection{1.\+3.\+0}\label{md_sfcode_node_modules_postcss_selector_parser_CHANGELOG_autotoc_md22173}

\begin{DoxyItemize}
\item Adds a new node type, {\ttfamily String}, to fix a crash on selectors such as {\ttfamily foo\+:bar(\char`\"{}test\char`\"{})}.
\end{DoxyItemize}\hypertarget{md_sfcode_node_modules_postcss_selector_parser_CHANGELOG_autotoc_md22174}{}\doxysection{1.\+2.\+1}\label{md_sfcode_node_modules_postcss_selector_parser_CHANGELOG_autotoc_md22174}

\begin{DoxyItemize}
\item Fixes a crash when the parser encountered a trailing combinator.
\end{DoxyItemize}\hypertarget{md_sfcode_node_modules_postcss_selector_parser_CHANGELOG_autotoc_md22175}{}\doxysection{1.\+2.\+0}\label{md_sfcode_node_modules_postcss_selector_parser_CHANGELOG_autotoc_md22175}

\begin{DoxyItemize}
\item A more descriptive error is thrown when the parser expects to find a pseudo-\/class/pseudo-\/element (thanks to @ashelley).
\item Adds support for line/column locations for selector nodes, as well as a {\ttfamily Node\#source\+Index} method (thanks to @davidtheclark).
\end{DoxyItemize}\hypertarget{md_sfcode_node_modules_postcss_selector_parser_CHANGELOG_autotoc_md22176}{}\doxysection{1.\+1.\+4}\label{md_sfcode_node_modules_postcss_selector_parser_CHANGELOG_autotoc_md22176}

\begin{DoxyItemize}
\item Fixes a crash when a selector started with a {\ttfamily $>$} combinator. The module will now no longer throw if a selector has a leading/trailing combinator node.
\end{DoxyItemize}\hypertarget{md_sfcode_node_modules_postcss_selector_parser_CHANGELOG_autotoc_md22177}{}\doxysection{1.\+1.\+3}\label{md_sfcode_node_modules_postcss_selector_parser_CHANGELOG_autotoc_md22177}

\begin{DoxyItemize}
\item Fixes a crash on {\ttfamily @} tokens.
\end{DoxyItemize}\hypertarget{md_sfcode_node_modules_postcss_selector_parser_CHANGELOG_autotoc_md22178}{}\doxysection{1.\+1.\+2}\label{md_sfcode_node_modules_postcss_selector_parser_CHANGELOG_autotoc_md22178}

\begin{DoxyItemize}
\item Fixes an infinite loop caused by using parentheses in a non-\/pseudo element context.
\end{DoxyItemize}\hypertarget{md_sfcode_node_modules_postcss_selector_parser_CHANGELOG_autotoc_md22179}{}\doxysection{1.\+1.\+1}\label{md_sfcode_node_modules_postcss_selector_parser_CHANGELOG_autotoc_md22179}

\begin{DoxyItemize}
\item Fixes a crash when a backslash ended a selector string.
\end{DoxyItemize}\hypertarget{md_sfcode_node_modules_postcss_selector_parser_CHANGELOG_autotoc_md22180}{}\doxysection{1.\+1.\+0}\label{md_sfcode_node_modules_postcss_selector_parser_CHANGELOG_autotoc_md22180}

\begin{DoxyItemize}
\item Adds support for replacing multiple nodes at once with {\ttfamily replace\+With} (thanks to @jonathantneal).
\item Parser no longer throws on sequential IDs and trailing commas, to support parsing of selector hacks.
\end{DoxyItemize}\hypertarget{md_sfcode_node_modules_postcss_selector_parser_CHANGELOG_autotoc_md22181}{}\doxysection{1.\+0.\+1}\label{md_sfcode_node_modules_postcss_selector_parser_CHANGELOG_autotoc_md22181}

\begin{DoxyItemize}
\item Fixes using {\ttfamily insert\+After} and {\ttfamily insert\+Before} during iteration.
\end{DoxyItemize}\hypertarget{md_sfcode_node_modules_postcss_selector_parser_CHANGELOG_autotoc_md22182}{}\doxysection{1.\+0.\+0}\label{md_sfcode_node_modules_postcss_selector_parser_CHANGELOG_autotoc_md22182}

\begin{DoxyItemize}
\item Adds {\ttfamily clone} and {\ttfamily replace\+With} methods to nodes.
\item Adds {\ttfamily insert\+Before} and {\ttfamily insert\+After} to containers.
\item Stabilises API.
\end{DoxyItemize}\hypertarget{md_sfcode_node_modules_postcss_selector_parser_CHANGELOG_autotoc_md22183}{}\doxysection{0.\+0.\+5}\label{md_sfcode_node_modules_postcss_selector_parser_CHANGELOG_autotoc_md22183}

\begin{DoxyItemize}
\item Fixes crash on extra whitespace inside a pseudo selector\textquotesingle{}s parentheses.
\item Adds sort function to the container class.
\item Enables the parser to pass its input through without transforming.
\item Iteration-\/safe {\ttfamily each} and {\ttfamily each\+Inside}.
\end{DoxyItemize}\hypertarget{md_sfcode_node_modules_postcss_selector_parser_CHANGELOG_autotoc_md22184}{}\doxysection{0.\+0.\+4}\label{md_sfcode_node_modules_postcss_selector_parser_CHANGELOG_autotoc_md22184}

\begin{DoxyItemize}
\item Tidy up redundant duplication.
\item Fixes a bug where the parser would loop infinitely on universal selectors inside pseudo selectors.
\item Adds {\ttfamily length} getter and {\ttfamily each\+Inside}, {\ttfamily map}, {\ttfamily reduce} to the container class.
\item When a selector has been removed from the tree, the root node will no longer cast it to a string.
\item Adds node type iterators to the container class (e.\+g. {\ttfamily each\+Comment}).
\item Adds filter function to the container class.
\item Adds split function to the container class.
\item Create new node types by doing {\ttfamily parser.\+id(opts)} etc.
\item Adds support for pseudo classes anywhere in the selector.
\end{DoxyItemize}\hypertarget{md_sfcode_node_modules_postcss_selector_parser_CHANGELOG_autotoc_md22185}{}\doxysection{0.\+0.\+3}\label{md_sfcode_node_modules_postcss_selector_parser_CHANGELOG_autotoc_md22185}

\begin{DoxyItemize}
\item Adds {\ttfamily next} and {\ttfamily prev} to the node class.
\item Adds {\ttfamily first} and {\ttfamily last} getters to the container class.
\item Adds {\ttfamily every} and {\ttfamily some} iterators to the container class.
\item Add {\ttfamily empty} alias for {\ttfamily remove\+All}.
\item Combinators are now types of node.
\item Fixes the at method so that it is not an alias for {\ttfamily index}.
\item Tidy up creation of new nodes in the parser.
\item Refactors how namespaces are handled for consistency \& less redundant code.
\item Refactors AST to use {\ttfamily nodes} exclusively, and eliminates excessive nesting.
\item Fixes nested pseudo parsing.
\item Fixes whitespace parsing.
\end{DoxyItemize}\hypertarget{md_sfcode_node_modules_postcss_selector_parser_CHANGELOG_autotoc_md22186}{}\doxysection{0.\+0.\+2}\label{md_sfcode_node_modules_postcss_selector_parser_CHANGELOG_autotoc_md22186}

\begin{DoxyItemize}
\item Adds support for namespace selectors.
\item Adds support for selectors joined by escaped spaces -\/ such as {\ttfamily .\textbackslash{}31\textbackslash{} 0}.
\end{DoxyItemize}\hypertarget{md_sfcode_node_modules_postcss_selector_parser_CHANGELOG_autotoc_md22187}{}\doxysection{0.\+0.\+1}\label{md_sfcode_node_modules_postcss_selector_parser_CHANGELOG_autotoc_md22187}

\begin{DoxyItemize}
\item Initial release. 
\end{DoxyItemize}