2bbab7aebd5738d07f98a33022000d5dc2b56f6cef7f691d9367830c46c33626c09877d44b4e344935a17dcb2bb9c4036466b4d0b05aec2daf74e75f2d6b3f 6.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217
  1. # 3.1.2
  2. * SECURITY FIX: update `dot-prop` to `5.2.0`
  3. ## Breaking changes
  4. * Unfortunately, due to fixing the vulnerability, the minimum supported version of the Node.js is `8`.
  5. # 3.1.1
  6. * Fix: typescript definitions weren't in the published package.
  7. # 3.1.0
  8. * Fixed numerous bugs in attribute nodes relating to the handling of comments
  9. and whitespace. There's significant changes to `attrNode.spaces` and `attrNode.raws` since the `3.0.0` release.
  10. * Added `Attribute#offsetOf(part)` to get the offset location of
  11. attribute parts like `"operator"` and `"value"`. This is most
  12. often added to `Attribute#sourceIndex` for error reporting.
  13. # 3.0.0
  14. ## Breaking changes
  15. * Some tweaks to the tokenizer/attribute selector parsing mean that whitespace
  16. locations might be slightly different to the 2.x code.
  17. * Better attribute selector parsing with more validation; postcss-selector-parser
  18. no longer uses regular expressions to parse attribute selectors.
  19. * Added an async API (thanks to @jacobp100); the default `process` API is now
  20. async, and the sync API is now accessed through `processSync` instead.
  21. * `process()` and `processSync()` now return a string instead of the Processor
  22. instance.
  23. * Tweaks handling of Less interpolation (thanks to @jwilsson).
  24. * Removes support for Node 0.12.
  25. ## Other changes
  26. * `ast()` and `astSync()` methods have been added to the `Processor`. These
  27. return the `Root` node of the selectors after processing them.
  28. * `transform()` and `transformSync()` methods have been added to the
  29. `Processor`. These return the value returned by the processor callback
  30. after processing the selectors.
  31. * Set the parent when inserting a node (thanks to @chriseppstein).
  32. * Correctly adjust indices when using insertBefore/insertAfter (thanks to @tivac).
  33. * Fixes handling of namespaces with qualified tag selectors.
  34. * `process`, `ast` and `transform` (and their sync variants) now accept a
  35. `postcss` rule node. When provided, better errors are generated and selector
  36. processing is automatically set back to the rule selector (unless the `updateSelector` option is set to `false`.)
  37. * Now more memory efficient when tokenizing selectors.
  38. ### Upgrade hints
  39. The pattern of:
  40. `rule.selector = processor.process(rule.selector).result.toString();`
  41. is now:
  42. `processor.processSync(rule)`
  43. # 2.2.3
  44. * Resolves an issue where the parser would not reduce multiple spaces between an
  45. ampersand and another simple selector in lossy mode (thanks to @adam-26).
  46. # 2.2.2
  47. * No longer hangs on an unescaped semicolon; instead the parser will throw
  48. an exception for these cases.
  49. # 2.2.1
  50. * Allows a consumer to specify whitespace tokens when creating a new Node
  51. (thanks to @Semigradsky).
  52. # 2.2.0
  53. * Added a new option to normalize whitespace when parsing the selector string
  54. (thanks to @adam-26).
  55. # 2.1.1
  56. * Better unquoted value handling within attribute selectors
  57. (thanks to @evilebottnawi).
  58. # 2.1.0
  59. * Added: Use string constants for all node types & expose them on the main
  60. parser instance (thanks to @Aweary).
  61. # 2.0.0
  62. This release contains the following breaking changes:
  63. * Renamed all `eachInside` iterators to `walk`. For example, `eachTag` is now
  64. `walkTags`, and `eachInside` is now `walk`.
  65. * Renamed `Node#removeSelf()` to `Node#remove()`.
  66. * Renamed `Container#remove()` to `Container#removeChild()`.
  67. * Renamed `Node#raw` to `Node#raws` (thanks to @davidtheclark).
  68. * Now parses `&` as the *nesting* selector, rather than a *tag* selector.
  69. * Fixes misinterpretation of Sass interpolation (e.g. `#{foo}`) as an
  70. id selector (thanks to @davidtheclark).
  71. and;
  72. * Fixes parsing of attribute selectors with equals signs in them
  73. (e.g. `[data-attr="foo=bar"]`) (thanks to @montmanu).
  74. * Adds `quoted` and `raw.unquoted` properties to attribute nodes
  75. (thanks to @davidtheclark).
  76. # 1.3.3
  77. * Fixes an infinite loop on `)` and `]` tokens when they had no opening pairs.
  78. Now postcss-selector-parser will throw when it encounters these lone tokens.
  79. # 1.3.2
  80. * Now uses plain integers rather than `str.charCodeAt(0)` for compiled builds.
  81. # 1.3.1
  82. * Update flatten to v1.x (thanks to @shinnn).
  83. # 1.3.0
  84. * Adds a new node type, `String`, to fix a crash on selectors such as
  85. `foo:bar("test")`.
  86. # 1.2.1
  87. * Fixes a crash when the parser encountered a trailing combinator.
  88. # 1.2.0
  89. * A more descriptive error is thrown when the parser expects to find a
  90. pseudo-class/pseudo-element (thanks to @ashelley).
  91. * Adds support for line/column locations for selector nodes, as well as a
  92. `Node#sourceIndex` method (thanks to @davidtheclark).
  93. # 1.1.4
  94. * Fixes a crash when a selector started with a `>` combinator. The module will
  95. now no longer throw if a selector has a leading/trailing combinator node.
  96. # 1.1.3
  97. * Fixes a crash on `@` tokens.
  98. # 1.1.2
  99. * Fixes an infinite loop caused by using parentheses in a non-pseudo element
  100. context.
  101. # 1.1.1
  102. * Fixes a crash when a backslash ended a selector string.
  103. # 1.1.0
  104. * Adds support for replacing multiple nodes at once with `replaceWith`
  105. (thanks to @jonathantneal).
  106. * Parser no longer throws on sequential IDs and trailing commas, to support
  107. parsing of selector hacks.
  108. # 1.0.1
  109. * Fixes using `insertAfter` and `insertBefore` during iteration.
  110. # 1.0.0
  111. * Adds `clone` and `replaceWith` methods to nodes.
  112. * Adds `insertBefore` and `insertAfter` to containers.
  113. * Stabilises API.
  114. # 0.0.5
  115. * Fixes crash on extra whitespace inside a pseudo selector's parentheses.
  116. * Adds sort function to the container class.
  117. * Enables the parser to pass its input through without transforming.
  118. * Iteration-safe `each` and `eachInside`.
  119. # 0.0.4
  120. * Tidy up redundant duplication.
  121. * Fixes a bug where the parser would loop infinitely on universal selectors
  122. inside pseudo selectors.
  123. * Adds `length` getter and `eachInside`, `map`, `reduce` to the container class.
  124. * When a selector has been removed from the tree, the root node will no longer
  125. cast it to a string.
  126. * Adds node type iterators to the container class (e.g. `eachComment`).
  127. * Adds filter function to the container class.
  128. * Adds split function to the container class.
  129. * Create new node types by doing `parser.id(opts)` etc.
  130. * Adds support for pseudo classes anywhere in the selector.
  131. # 0.0.3
  132. * Adds `next` and `prev` to the node class.
  133. * Adds `first` and `last` getters to the container class.
  134. * Adds `every` and `some` iterators to the container class.
  135. * Add `empty` alias for `removeAll`.
  136. * Combinators are now types of node.
  137. * Fixes the at method so that it is not an alias for `index`.
  138. * Tidy up creation of new nodes in the parser.
  139. * Refactors how namespaces are handled for consistency & less redundant code.
  140. * Refactors AST to use `nodes` exclusively, and eliminates excessive nesting.
  141. * Fixes nested pseudo parsing.
  142. * Fixes whitespace parsing.
  143. # 0.0.2
  144. * Adds support for namespace selectors.
  145. * Adds support for selectors joined by escaped spaces - such as `.\31\ 0`.
  146. # 0.0.1
  147. * Initial release.