# css-select changelog > css-select release notes. - Vendor: css-select - Category: Languages & Runtimes - Official site: https://github.com/fb55/css-select#readme - Tracked by: What's New (https://whatsnew.fyi/product/css-select) - Harvested from: GitHub (fb55/css-select) - Entries below: 10 (newest first) What's New is an index, not a publisher: every entry below links to the vendor's own release notes, which are the authoritative source. Entries are labelled where they are hand-curated sample data, pre-releases, or drawn from a secondary source such as a developer blog. ## Releases ### v7.0.0 - Date: 2026-03-22 - Version: v7.0.0 - Original notes: https://github.com/fb55/css-select/releases/tag/v7.0.0 - Permalink: https://whatsnew.fyi/product/css-select/releases/v7.0.0 - **changed** — Package is now ESM only with "type": "module"; CommonJS require() is only supported in modern environments - **changed** — Minimum Node.js version is now 20.19.0 - **removed** — Removed the deprecated _compileToken export; use _compileUnsafe instead - **removed** — Removed the deprecated re-exports of aliases, filters, and pseudos; use the pseudos option instead - **removed** — Removed ./package.json subpath export - **changed** — :enabled now only matches form elements - **added** — Added support for the :lang() pseudo-class - **added** — Added support for of in nth-* pseudo-classes, e.g. :nth-last-child(3n+2 of .a) ##### Breaking Changes - **ESM only**: the package now sets `"type": "module"`; CommonJS `require()` is only supported in modern environments [#1746](https://github.com/fb55/css-select/pull/1746) - Minimum Node.js version is now 20.19.0 - Cleaned up deprecations - Removed the deprecated `_compileToken` export. Use `_compileUnsafe` instead - Removed the deprecated re-exports of `aliases`, `filters`, and `pseudos`. Use the `pseudos` option instead - Removed `./package.json` subpath export - `:enabled` now only matches form elements ##### New Features - Added support for the `:lang()` pseudo-class - Added support for *of* in `nth-*` pseudo-classes, e.g. `:nth-last-child(3n+2 of .a)` **Full Changelog**: https://github.com/fb55/css-select/compare/v6.0.0...v7.0.0 ### v6.0.0 - Date: 2025-06-29 - Version: v6.0.0 - Original notes: https://github.com/fb55/css-select/releases/tag/v6.0.0 - Permalink: https://whatsnew.fyi/product/css-select/releases/v6.0.0 - Re-release of 5.2.0 - Switch to tshy, vitest & Biome (#1596) f7fd5fc --- https://github.com/fb55/css-select/compare/v5.2.1...v6.0.0 ### v5.2.1 - Date: 2025-06-28 - Version: v5.2.1 - Original notes: https://github.com/fb55/css-select/releases/tag/v5.2.1 - Permalink: https://whatsnew.fyi/product/css-select/releases/v5.2.1 ~~The previous release was missing the `dist` directory.~~ Release 5.2.0 and 5.2.1 included breaking changes; 5.2.2 is a re-publish of 5.1.0 --- https://github.com/fb55/css-select/compare/v5.2.0...v5.2.1 ### v5.2.0 - Date: 2025-06-28 - Version: v5.2.0 - Original notes: https://github.com/fb55/css-select/releases/tag/v5.2.0 - Permalink: https://whatsnew.fyi/product/css-select/releases/v5.2.0 - **added** — Cache results for subtrees to speed up :contains and :has - **added** — Add support for :read-only and :read-write pseudos - **changed** — Improve support for large documents - **fixed** — Allow whitespace in :empty - **fixed** — Filter queried elements inside template element - **fixed** — Handle template tags in selectOne ##### New Features - Cache results for subtrees; vastly speeds up `:contains` and `:has` [#1025](https://github.com/fb55/css-select/pull/1025) – by @fb55 - Add support for `:read-only` and `:read-write` pseudos [#1497](https://github.com/fb55/css-select/pull/1497) – by @jed - Improved support for large documents [#1132](https://github.com/fb55/css-select/pull/1132) – by @fb55 ##### Fixes - Allow whitespace in `:empty` [#795](https://github.com/fb55/css-select/pull/795) – by @fb55 - Filter queried elements inside template element [#981](https://github.com/fb55/css-select/pull/981) – by @andolf - Handle template tags in `selectOne` [#1001](https://github.com/fb55/css-select/pull/1001) – by @fb55 ##### New Contributors * @andolf made their first contribution in https://github.com/fb55/css-select/pull/981 * @EFord36 made their first contribution in https://github.com/fb55/css-select/pull/1107 * @jed made their first contribution in https://github.com/fb55/css-select/pull/1497 **Full Changelog**: https://github.com/fb55/css-select/compare/v5.1.0...v5.2.0 ### v5.1.0 - Date: 2022-04-27 - Version: v5.1.0 - Original notes: https://github.com/fb55/css-select/releases/tag/v5.1.0 - Permalink: https://whatsnew.fyi/product/css-select/releases/v5.1.0 - **added** — Add a relativeSelector option to control whether selectors are relative to the passed context or can match parent elements outside of the context - Added an option to disable relative selectors (#766) 1c1f7f2 - By default, selectors are relative to the passed `context`, which means that no parent elements of the context will be matched. (Eg. `a b c` with context `b` will never give any results.) If the `relativeSelector` option is set to `false`, selectors won't be [absolutized](http://www.w3.org/TR/selectors4/#absolutizing) and selectors can test for parent elements outside of the `context`. - See https://github.com/fb55/css-select/issues/709 for context. https://github.com/fb55/css-select/compare/v5.0.1...v5.1.0 ### v5.0.1 - Date: 2022-04-25 - Version: v5.0.1 - Original notes: https://github.com/fb55/css-select/releases/tag/v5.0.1 - Permalink: https://whatsnew.fyi/product/css-select/releases/v5.0.1 - **fixed** — Options are now properly passed on to sub-selectors such as :is(...) or :not(...) - fix: Previously, some options weren't properly passed on to sub-selectors such as `:is(...)` or `:not(...)`. (#758) 77945c4 https://github.com/fb55/css-select/compare/v5.0.0...v5.0.1 ### v5.0.0 - Date: 2022-04-24 - Version: v5.0.0 - Original notes: https://github.com/fb55/css-select/releases/tag/v5.0.0 - Permalink: https://whatsnew.fyi/product/css-select/releases/v5.0.0 - **removed** — Remove support for deep imports in the dual CJS and ESM package - **changed** — Update node types due to changes in domhandler - **changed** — Change error message for unknown pseudo classes - **added** — Add a pseudos option to allow users to specify pseudo-classes - **deprecated** — Extending filters, pseudos and aliases is now deprecated - **fixed** — Throw an error for :host-context pseudo-class ##### Breaking - `domhandler`'s node types have changed. Some of these changes were inherited by `css-select` #754 - `css-select` is now a dual CJS and ESM package #756 - Deep imports are no longer permitted - Throw an error for `:host-context` #755 - The error message for unknown pseudo classes has changed. ##### Features - Added a `pseudos` option #757 - This option allows users to specify pseudo-classes. - Extending `filters`, `pseudos` and `aliases` is now deprecated. https://github.com/fb55/css-select/compare/v4.3.0...v5.0.0 ### v4.3.0 - Date: 2022-03-28 - Version: v4.3.0 - Original notes: https://github.com/fb55/css-select/releases/tag/v4.3.0 - Permalink: https://whatsnew.fyi/product/css-select/releases/v4.3.0 - **added** — Add quirks mode option where .class and #id selectors are case-insensitive - **added** — Add optional prevElementSibling adapter method - **fixed** — Throw errors for namespaced selectors with better descriptions ##### What's Changed * feat: Upgrade to css-what@6, add quirks mode option by @fb55 in https://github.com/fb55/css-select/pull/657 * In quirks mode, `.class` and `#id` selectors are case-insensitive. * feat: Add optional `prevElementSibling` adapter method by @fb55 in 78776e8 * fix: Throw errors for namespaced selectors by @fb55 in 255e965 * Namespaced selectors (eg. `*|div`, `[foo|bar]` already caused errors before this release. We now parse them properly and throw errors with better descriptions. **Full Changelog**: https://github.com/fb55/css-select/compare/v4.2.1...v4.3.0 ### v4.2.1 - Date: 2021-12-26 - Version: v4.2.1 - Original notes: https://github.com/fb55/css-select/releases/tag/v4.2.1 - Permalink: https://whatsnew.fyi/product/css-select/releases/v4.2.1 - **fixed** — Don't add siblings multiple times in appendNextSiblings - fix: Don't add siblings multiple times in `appendNextSiblings` (#656) 726f51b - docs: Improve README e8974a3 https://github.com/fb55/css-select/compare/v4.2.0...v4.2.1 ### v4.2.0 - Date: 2021-12-14 - Version: v4.2.0 - Original notes: https://github.com/fb55/css-select/releases/tag/v4.2.0 - Permalink: https://whatsnew.fyi/product/css-select/releases/v4.2.0 - **added** — Support for :where pseudo class as alias for :is ##### What's Changed * chore(ci): Switch to GitHub Actions by @fb55 in https://github.com/fb55/css-select/pull/493 * feat: Add support for `:where` pseudo class as alias for `:is` by @jannispl in https://github.com/fb55/css-select/pull/582 ##### New Contributors * @lrosemberg made their first contribution in https://github.com/fb55/css-select/pull/489 * @jannispl made their first contribution in https://github.com/fb55/css-select/pull/582 **Full Changelog**: https://github.com/fb55/css-select/compare/v4.1.3...v4.2.0