All Versions
Latest Version
Avg Release Cycle
103 days
Latest Release
2159 days ago

Changelog History
Page 1

  • v1.0.0 Changes

    July 02, 2017


  • v1.0.0-rc.3 Changes

    April 06, 2019

    🚀 This release corrects a test expectation that was fixed by one of the project's dependencies.

  • v1.0.0-rc.2 Changes

    July 02, 2017

    🚀 This release changes Cheerio's default parser to the Parse5 HTML 📜 parser. Parse5 is an excellent project 👍 that rigorously conforms to the HTML standard. It does not support XML, so 📜 Cheerio continues to use htmlparser2 when working with XML documents.

    This switch addresses many long-standing bugs in Cheerio, but some users may 🚑 experience slower behavior in performance-critical applications. In addition, 📜 htmlparser2 is more forgiving of invalid markup which can be useful when input sourced from a third party and cannot be corrected. For these reasons, 📜 the load method also accepts a DOM structure as produced by the htmlparser2 👀 library. See the project's "readme" file for more details on this usage pattern.

    Migrating from version 0.x

    cheerio.load( html[, options ] ) This method continues to act as a "factory" function. It produces functions that define an API that is similar to the global jQuery function provided by the jQuery library. The generated function operates on a DOM structure based on the provided HTML.

    🚀 In releases prior to version 1.0, the provided HTML was interpreted as a document fragment. Following version 1.0, strings provided to the load method are interpreted as documents. The same example will produce a $ function that operates on a full HTML document, including an <html> document element with 💻 nested <head> and <body> tags. This mimics web browser behavior much more closely, but may require alterations to existing code.

    For example, the following code will produce different results between 0.x and 🚀 1.0 releases:

    var $ = cheerio.load('<p>Hello, <b>world</b>!</p>');
    //=> In version 0.x: '<p>Hello, <b>world</b>!</p>'
    //=> In version 1.0: '<html><head></head><body><p>Hello, <b>world</b>!</p></body></html>'

    📜 Users wishing to parse, manipulate, and render full documents should not need to modify their code. Likewise, code that does not interact with the "root" element should not be effected by this change. (In the above example, the expression $('p') returns the same result across Cheerio versions--a Cheerio collection whose only member is a paragraph element.)

    However, users wishing to render document fragments should now explicitly create a "wrapper" element to contain their input.

    // First, create a Cheerio function "bound" to an empty document (this is
    // similar to loading an empty page in a web browser)
    var $ = cheerio.load('');
    // Next, create a "wrapper" element for the input fragment:
    var $wrapper = $('<div/>');
    // Finally, supply the input markup as the content for the wrapper:
    $wrapper.append('<p>Hello, <b>world</b>!</p>');
    //=> '<p>Hello, <b>world</b>!</p>'

    🔄 Change log:

    • ⚡️ Update (and include migration guide) (Mike Pennisi)
    • 📜 Rename useHtmlParser2 option (Mike Pennisi)
    • ✂ Remove documentation for xmlMode option (Mike Pennisi)
    • 📜 Document advanced usage with htmlparser2 (Mike Pennisi)
    • Correct errors in (Mike Pennisi)
    • 👌 Improve release process (Mike Pennisi)
    • 1.0.0-rc.1 (Mike Pennisi)
    • ⚡️ Update unit test (Mike Pennisi)
    • 💅 Normalize code style (Mike Pennisi)
    • ➕ Added support for nested wrapping. (Diane Looney)
    • ➕ Add nested wrapping test (Toni Helenius)
    • ➕ Added $.merge following the specification at Added test cases for $.merge (Diane Looney)
    • Clarify project scope in README file (Mike Pennisi)
    • 💅 .text() ignores script and style tags (#1018) (Haleem Assal)
    • ✅ Test suite housekeeping (#1016) (DianeLooney)
    • 👷 experiment with a job board (Matthew)
    • 🔄 Change options format (inikulin)
    • ➕ Add test for #997 (inikulin)
    • ⚡️ Update .filter function docs. (Konstantin)
    • Standardise readme on ES6 variable declarations (Dekatron)
    • 👉 Use documents via \$.load (inikulin)
    • 0️⃣ Use parse5 as a default parser (closes #863) (inikulin)
    • 🛠 Fix small typo in Readme (Darren Scerri)
    • 👷 Report test failures in CI (Mike Pennisi)
    • serializeArray should not ignore input elements without value attributes (Ricardo Gladwell)
    • Disallow variable shadowing (Mike Pennisi)
    • ⚡️ Update hasClass method (sufisaid)
    • ➕ Added MIT License fixes #902 (Prasanth Vaaheeswaran)
    • ⚡️ chore(package): update dependencies (greenkeeper[bot])
    • 📦 Use modular lodash package (#913) (Billy Janitsch)
  • v1.0.0-rc.1

    May 27, 2017
  • v0.22.0 Changes

    August 23, 2016
    • Return undefined in .prop if given an invalid element or tag (#880)
    • Merge pull request #884 from cheeriojs/readme-cleanup
    • readme updates
    • Merge pull request #881 from piamancini/patch-1
    • Added backers and sponsors from OpenCollective
    • Use jQuery from the jquery module in benchmarks (#871)
    • Document, test, and extend static $.text method (#855)
    • Fix typo on calling _.extend (#861)
    • Update versions (#870)
    • Use individual lodash functions (#864)
    • Added .serialize() support. Fixes #69 (#827)
    • Update (#857)
    • add extension for JSON require call
    • remove gittask badge
    • Merge pull request #672 from underdogio/dev/
    • Added default value for checkboxes/radios
  • v0.21.0 Changes

    August 23, 2016


  • v0.20.0 Changes

    February 01, 2016
    • Add coveralls badge, remove link to old report (Felix Böhm)
    • Update lodash dependeny to 4.1.0 (leif.hanack)
    • Fix PR #726 adding 'appendTo()' and 'prependTo()' (Delgan)
    • Added appendTo and prependTo with tests #641 (digihaven)
    • Fix #780 by changing options context in '.find()' (Felix Böhm)
    • Add an unit test checking the query of child (Delgan)
    • fix #667: attr({foo: null}) removes attribute foo, like attr('foo', null) (Ray Waldin)
    • Include reference to dedicated "Loading" section (Mike Pennisi)
    • Added load method to $ (alanev)
    • update css-select to 1.2.0 (Felix Böhm)
    • Fixing Grammatical Error (Dan Corman)
    • Test against node v0.12 --> v4.2 (Jason Kurian)
    • Correct output in example (Felix Böhm)
    • Fix npm files filter (Bogdan Chadkin)
    • Enable setting data on all elements in selection (Mike Pennisi)
    • Reinstate $.fn.toArray (Mike Pennisi)
    • update css-select to 1.1.0 (Thomas Shafer)
    • Complete implementation of wrap (Mike Pennisi)
    • Correct name of unit test (Mike Pennisi)
    • Correct grammar in test titles (Mike Pennisi)
    • Normalize whitespace (Mike Pennisi)
    • Insert omitted assertion (Mike Pennisi)
    • Update invocation of children (Mike Pennisi)
    • Begin implementation of wrap method (Dandlezzz)
    • Update (Sven Slootweg)
    • fix document's mistake in (exoticknight)
    • Add tests for setting text and html as non-strings (Ryc O'Chet)
    • Fix for passing non-string values to .html or .text (Ryc O'Chet)
    • use a selector to filter form elements (fb55)
    • fix typo (Yutian Li)
    • README: fix spelling (Chris Rebert)
    • Added support for options without a value attribute. Fixes #633 (Todd Wolfson)
    • responding to pull request feedback - remove item() method and related tests (Ray Waldin)
    • add length property and item method to object returned by prop('style'), plus tests (Ray Waldin)
    • Added .prop method to readme (Artem Burtsev)
    • Added .prop method (Artem Burtsev)
    • Added Gitter badge (The Gitter Badger)
  • v0.19.0 Changes

    March 21, 2015
    • fixed allignment (fb55)
    • added test case for malformed json in data attributes (fb55)
    • fix: handle some extreme cases like data-custom="{{templatevar}}". There is possibility error while parsing json . (Harish.K)
    • Add missing optional selector doc for {prev,next}{All,Until} (Jérémie Astori)
    • update to [email protected] (Felix Böhm)
    • Document Cheerio#serialzeArray (Mike Pennisi)
    • Fixed up serializeArray() and added multiple support (Todd Wolfson)
    • Implement serializeArray() (Jarno Leppänen)
    • recognize options in $.xml() (fb55)
    • lib/static.js: text(): rm errant space before ++ (Chris Rebert)
    • Do not expose internal children array (Mike Pennisi)
    • Change lodash dependencies to 3.1.0 (Samy Pessé)
    • Update [email protected] (Samy Pessé)
    • Updates .not(function (index, elem)) (Patrick Ward)
    • update to [email protected] (fb55)
    • Allow failures in Node.js v0.11 (Mike Pennisi)
    • Added: Gittask badge (Matthew Mueller)
    • Isolate prototypes of functions created via load (Mike Pennisi)
    • Updates adds JS syntax highlighting (frankcash)
    • #608 -- Add support for insertBefore/insertAfter syntax. Supports target types of: $, [$], selector (both single and multiple results) (Ben Cochran)
    • Clone input nodes when inserting over a set (Mike Pennisi)
    • Move unit test files (Mike Pennisi)
    • remove unnecessarily tricky code (David Chambers)
    • pass options to $.html in toString (fb55)
    • add license info to package.json (Chris Rebert)
    • [email protected]~0.5.0 (David Chambers)
    • Remove unofficial signature of children (Mike Pennisi)
    • Fix bug in css method (Mike Pennisi)
    • Correct bug in implementation of Cheerio#val (Mike Pennisi)
  • v0.18.0 Changes

    November 06, 2014
    • bump htmlparser2 dependency to ~3.8.1 (Chris Rebert)
    • Correct unit test titles (Mike Pennisi)
    • Correct behavior of after and before (Mike Pennisi)
    • implement jQuery's .has() (Chris Rebert)
    • Update repository url (haqii)
    • attr() should return undefined or name for booleans (Raoul Millais)
    • Update (Ryan Breen)
    • Implement Cheerio#not (Mike Pennisi)
    • Clone nodes according to original parsing options (Mike Pennisi)
    • fix lint error (David Chambers)
    • Add explicit tests for DOM level 1 API (Mike Pennisi)
    • Expose DOM level 1 API for Node-like objects (Mike Pennisi)
    • Correct error in documentation (Mike Pennisi)
    • Return a fully-qualified Function from $.load (Mike Pennisi)
    • Update tests to avoid duck typing (Mike Pennisi)
    • Alter "loaded" functions to produce true instances (Mike Pennisi)
    • Organize tests for cheerio.load (Mike Pennisi)
    • Complete $.prototype.find (Mike Pennisi)
    • Use JSHint's extends option (Mike Pennisi)
    • Remove aliases for exported methods (Mike Pennisi)
    • Disallow unused variables (Mike Pennisi)
    • Remove unused internal variables (Mike Pennisi)
    • Remove unused variables from unit tests (Mike Pennisi)
    • Remove unused API method references (Mike Pennisi)
    • Move tests for contains method (Mike Pennisi)
    • [email protected] (David Chambers)
    • Created a wiki for companies using cheerio in production (Matthew Mueller)
    • Implement $.prototype.index (Mike Pennisi)
    • Implement $.prototype.addBack (Mike Pennisi)
    • Added double quotes to radio attribute name to account for characters such as brackets (akant10)
    • Update (Gabriel Falkenberg)
    • add 0.17.0 changelog (David Chambers)
    • exit prepublish script if tag not found (David Chambers)
    • alphabetize devDependencies (fb55)
    • ignore coverage dir (fb55)
    • submit coverage to coveralls (fb55)
    • replace jscoverage with istanbul (fb55)
  • v0.17.0 Changes

    June 10, 2014
    • Fix bug in internal uniqueSplice function (Mike Pennisi)
    • accept buffer argument to cheerio.load (David Chambers)
    • Respect options on the element level (Alex Indigo)
    • Change state definition to more readable (Artem Burtsev)
    • added test (0xBADC0FFEE)
    • add class only if doesn't exist (Artem Burtsev)
    • Made it less insane. (Alex Indigo)
    • Implement Cheerio#add (Mike Pennisi)
    • Use "loaded" instance of Cheerio in unit tests (Mike Pennisi)
    • Be more strict with object check. (Alex Indigo)
    • Added options argument to .html() static method. (Alex Indigo)
    • Fixed encoding mishaps. Adjusted tests. (Alex Indigo)
    • use dom-serializer module (fb55)
    • don't test on 0.8, don't ignore 0.11 (Felix Böhm)
    • parse: rm unused variables (coderaiser)
    • cheerio: rm unused variable (coderaiser)
    • Fixed test (Avi Kohn)
    • Added test (Avi Kohn)
    • Changed == to === (Avi Kohn)
    • Fixed a bug in removing type="hidden" attr (Avi Kohn)
    • sorted (Alexey Raspopov)
    • add muted attr to booleanAttributes (Alexey Raspopov)
    • fixed context of this in .html (Felix Böhm)
    • append new elements for each element in selection (fb55)