NewYour coding agent can read the release notes before it upgrades.Set up the MCP server →
npm · #438 most downloaded on npm
a CSS selector compiler/engine
Last release 6 months ago
22 Mar 2026
Ships unpredictably
gaps range from 8 days to 3.2 years
Most releases are documented
notes for 25 of 30 stable releases
Nothing withdrawn
no release was ever pulled
12 years old
31 releases · first in 2015
Removed the deprecated _compileToken export. Use _compileUnsafe instead
"type": "module"; CommonJS require() is only supported in modern environments #1746
_compileToken export. Use _compileUnsafe insteadaliases, filters, and pseudos. Use the pseudos option instead./package.json subpath export:enabled now only matches form elements:lang() pseudo-classnth-* pseudo-classes, e.g. :nth-last-child(3n+2 of .a)Full Changelog: v6.0.0...v7.0.0
Switch to tshy, vitest & Biome ( #1596 ) f7fd5fc
One column per quarter.
Nothing published for this version
Release 5.2.0 and 5.2.1 included breaking changes; 5.2.2 is a re-publish of 5.1.0
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
Cache results for subtrees; vastly speeds up :contains and :has #1025 – by @fb55
:contains and :has #1025 – by @fb55:read-only and :read-write pseudos #1497 – by @jed:empty #795 – by @fb55selectOne #1001 – by @fb55Full Changelog: v5.1.0...v5.2.0
Added an option to disable relative selectors ( #766 ) 1c1f7f2
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.)relativeSelector option is set to false, selectors won't be absolutized and selectors can test for parent elements outside of the context.fix: Previously, some options weren't properly passed on to sub-selectors such as :is(...) or :not(...) . ( #758 ) 77945c4
Extending filters , pseudos and aliases is now deprecated.
domhandler's node types have changed. Some of these changes were inherited by css-select #754css-select is now a dual CJS and ESM package #756
:host-context #755
pseudos option #757
filters, pseudos and aliases is now deprecated.feat: Upgrade to css-what@6, add quirks mode option by @fb55 in #657
.class and #id selectors are case-insensitive.prevElementSibling adapter method by @fb55 in 78776e8*|div, [foo|bar] already caused errors before this release. We now parse them properly and throw errors with better descriptions.Full Changelog: v4.2.1...v4.3.0
fix: Don't add siblings multiple times in appendNextSiblings ( #656 ) 726f51b
chore(ci): Switch to GitHub Actions by @fb55 in https://github.com/fb55/css-select/pull/493
:where pseudo class as alias for :is by @jannispl in https://github.com/fb55/css-select/pull/582Full Changelog: https://github.com/fb55/css-select/compare/v4.1.3...v4.2.0
compile's return value type was updated to Node, instead of an Element (more types can now be passed). 1419455
Fixes:
compile's return value type was updated to Node, instead of an Element (more types can now be passed). 1419455Dependencies:
css-what from 5.0.0 to 5.0.1, fixing potentially expensive regex (#451) e3f4cf1@types/boolbase 636c238https://github.com/fb55/css-select/compare/v4.1.2...v4.1.3
fix(types): Fixed last context types e15cc53
context types e15cc53https://github.com/fb55/css-select/compare/v4.1.1...v4.1.2
fix(types): Fix context types not being updated everywhere d2b0409
context types not being updated everywhere d2b0409https://github.com/fb55/css-select/compare/v4.1.0...v4.1.1
Added support for additional parameter types:
Added support for additional parameter types:
https://github.com/fb55/css-select/compare/v4.0.0...v4.1.0
Aliases are a new way to write pseudos (#403) 206535e
New features:
css-what@5.0.0
s flag in attribute selectors.Fixes:
!= ignoring elements without attribute (#402) 4484259Other:
strict option 9329fb8
https://github.com/fb55/css-select/compare/v3.1.2...v4.0.0
fix: Ensure parent elements are tags efcfcdb
https://github.com/fb55/css-select/compare/v3.1.1...v3.1.2
Support DOM elements of type root in the :root pseudo-selector c4d2b7b
Fixes:
root in the :root pseudo-selector c4d2b7bDependency upgrades:
feat(index): Export prepareContext function f997165
prepareContext function f997165cacheResults option 6db3de6https://github.com/fb55/css-select/compare/v3.0.4...v3.1.0
Bump css-what, add domhandler as dep cbb7187
https://github.com/fb55/css-select/compare/v3.0.3...v3.0.4
Fix types entry in package.json
types entry in package.jsonFixed an issue where the previous release didn't include built assets (reported in #229)
Port all shipped code to TypeScript, identifying several inconsistencies along the way
default property. If you used the exported function before, you will have to update your code.adapter.equals across the codebase
options object, not the adapter anymore. To update your code, extract the adapter from the options object, eg. pseudos.custom = (elem, adapter) => {} is now pseudos.custom = (elem, {adapter}) => {}.:any-link:has (fixes #111)_Released with a breaking bug, please ignore._
Released with a breaking bug, please ignore.
Add pseudos that depend on optional Adapter APIs (#139, @jaspreet57)
pseudos that depend on optional Adapter APIs (#139, @jaspreet57)Nothing published for this version
Change since 1.3.0-rc0 (#101): Adapters are now passed in options, which results in two breaking changes: First, pseudo selectors now take the adapter…
Finally a new release!
options, which results in two breaking changes: First, pseudo selectors now take the adapter as the second argument, and arguments as the third. Second, filters aren’t checked anymore if they have the required number of arguments.Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Your coding agent can read these notes before it upgrades. Set up the MCP server →