css-what

Frameworks & LibrariesBSD-2-Clause

A CSS selector parser, the one behind css-select and cheerio.

Latest v8.0.0 · by css-whatWritten in TypeScriptWebsitefb55/css-whatRSS

Changelog

What changed from 7 to 8

v6.2.0

Added 1
  • Support legacy pseudo-elements in parse
Changed 1
  • Remove references to obsolete options parameter in documentation
Fixed 1
  • Escape % in attribute value

From css-what

What's Changed
New Contributors

Full Changelog: https://github.com/fb55/css-what/compare/v6.1.0...v7

View originalPermalink
How v6.2.0 went

v6.0.0

Added 2
  • Add ES6 module export
  • Support parsing column combinators
Changed 5
  • Add a new value for ignoreCase: 'quirks' should ignore the case only in quirks mode
  • Tags and attributes aren't lowercased anymore
  • Make selector types & actions enums
  • Set empty namespace to null in attributes
  • Simplify stringify output
Fixed 1
  • Strip leading whitespace encapsulated in comments
Removed 1
  • Remove all options

From css-what

Breaking Changes
  • Added ES6 module export (by @spocke, https://github.com/fb55/css-what/pull/680)
    • CommonJS is still provided for earlier NodeJS versions, but this change might cause issues with your build system. If they aren't trivially resolved, please open an issue!
  • Removed all options 5cad07b
    • BREAKING: Added a new value for ignoreCase: 'quirks' should ignore the case only in quirks mode.
    • BREAKING: Tags and attributes aren't lowercased anymore
  • Made selector types & actions enums 65121fe
  • Set empty namespace to null in attributes de367ca
  • Simplify stringify output 8a29466 b3e5e59
Features
  • Support parsing column combinators 8030f67
Fixes
  • Strip leading whitespace encapsulated in comments a812a1c
    • This used to be a way to sneak in descendant operators in front of selectors.
Refactors
  • Switched parsing to numbers 65121fe
  • Restructured the parser to a big switch statement 7b6cc76
Other
  • Adopted CSS Selector parsing tests from WPT 1881bba
  • Updated README to reflect changes b165a8d
New Contributors

Full Changelog: https://github.com/fb55/css-what/compare/v5.1.0...v6.0.0

View originalPermalink
How v6.0.0 went

v5.0.1

Fixed 1
  • Hand-roll attribute parsing to ensure attribute parsing will always be linear and make attribute values slightly more permissive

From css-what

Fixes:

  • Hand-roll attribute parsing (#503) 4cdaacf
    • Attribute values are slightly more permissive now. Ensures attribute parsing will always be linear.

https://github.com/fb55/css-what/compare/v5.0.0...v5.0.1

View originalPermalink
How v5.0.1 went

v5.0.0

Added 3
  • Support s flag in attribute selectors for case-insensitive matching
  • Allow space after attribute selector modifier
  • Ignore comments around selectors
Changed 1
  • ignoreCase on attributes now respects the s flag and default values as per HTML spec when not in xmlMode
Fixed 1
  • Incorrect handling of elemental selector without a namespace

From css-what

New Features:

  • ignoreCase on attributes now respects the s flag, as well as default values as per HTML spec (unless you are in xmlMode).
    • Infer ignoreCase as per HTML spec (#444 by @fb55) 0f4210c
    • Allow space after attribute selector modifier (#393 by @Semigradsky) a334fa3
    • Support s identifier in attribute selectors (#387 by @Semigradsky) 7a41152
  • Ignore comments around selectors (#441 by @fb55) fc91ba1

Bug fixes:

  • Incorrect handling elemental selector without a namespace (#394 by @Semigradsky) 3215f5a
View originalPermalink
How v5.0.0 went
View all

Discussion

If you publish css-what, you can claim this product by proving you administer its repository.