Skip to content

v6.0.0

Latest

Choose a tag to compare

@derevnjuk derevnjuk released this 03 Dec 14:25

6.0.0 (2026-12-03)

⚠ BREAKING CHANGES

  • when the plugin cannot read a response body, the reason
    is now written to
    response.content._error instead of response.content.error, since HAR 1.2
    allows only fields that
    start with an underscore beyond the spec.
  • cy.saveHar() and the HAR recorded for each spec now
    wait for the network to be
    idle before saving, up to maxWaitDuration (5 seconds by default). Pass
    waitForIdle: false to save
    right away as before.
  • the HAR recorded for each spec keeps the spec's folder
    below the fixed start of
    specPattern inside hars_folder, e.g. cypress/e2e/admin/login.cy.ts
    is saved as
    {hars_folder}/admin/login.cy.har instead of
    {hars_folder}/login.cy.har.
  • ensureBrowserFlags is removed. install already adds
    the browser flags; to keep
    your own before:browser:launch listener next to the plugin's, wrap on
    with cypress-on-fix as the
    README shows.
  • Cypress internal requests under /__/, /__cypress/,
    /__cypress-studio/ and /__cypress-cy-prompt/ are excluded by
    default; pass excludePaths: [] to record them.
  • install requires the Cypress config: call
    install(on, config). It records a HAR
    for each spec by default; pass { lifecycle: false } to record only
    with the commands.
    enableExperimentalLifecycle is removed; use install(on, config)
    instead.
  • The plugin requires Cypress 15.10.0 or later. The
    hars_folder variable is read
    only from the expose object or the --expose option; it is no longer
    read from the env object,
    the --env option or the CYPRESS_hars_folder environment variable,
    and the upper-case
    HARS_FOLDER name is no longer read. Set expose: { hars_folder: '...' } in the Cypress config or
    pass --expose hars_folder=... instead.
  • minStatusCodeToInclude is removed; use
    excludeStatusCodes instead. The
    hars_folders variable and CYPRESS_HARS_FOLDERS are no longer read;
    use hars_folder and
    CYPRESS_hars_folder. Blob requests are no longer recorded by default;
    pass includeBlobs: true
    to record them.
  • Node.js older than 20.19.0, or 22.x older than 22.12.0,
    is no longer supported.
  • TypeScript projects need TypeScript 5.0 or later. On
    earlier versions, stay on version 5
    of the plugin.
  • Only @neuralegion/cypress-har-generator,
    @neuralegion/cypress-har-generator/commands and
    @neuralegion/cypress-har-generator/package.json
    can be imported. Deep imports of any other file, such as
    @neuralegion/cypress-har-generator/dist/index.js or
    @neuralegion/cypress-har-generator/commands.js, fail with
    ERR_PACKAGE_PATH_NOT_EXPORTED; import
    the package root or @neuralegion/cypress-har-generator/commands
    instead.
  • Cypress 14.0.0 or later is required; on older Cypress,
    stay on version 5.

Features

  • exclude the Cypress internal requests by default (#624) (c198283)
  • expose only the public entry points in exports (#622) (34bf899)
  • plugin: fail the run when a HAR cannot be written (#689) (38546c9)
  • group the entries by the pages of the app, as DevTools does (#661) (d17f9e8)
  • keep one entry for each repeated request with dedupe (#659) (454ada3)
  • keep only the entries of the failed tests with failedTestsOnly (#668) (a53569e)
  • keep the spec folder in the name of the HAR recorded for each spec (#645) (0054550)
  • leave the per-run values out of the HAR with stable (#660) (79be463)
  • list how each test try ended in _tests (#669) (a090258)
  • list the tests in log._tests and refer to them by _testref (#662) (63cd259)
  • read hars_folder only from expose and require Cypress 15.10 (#633) (31791bc)
  • record a HAR for each spec by default (#623) (52c01ee), closes #306
  • remove ensureBrowserFlags (#646) (c9c8675)
  • remove the deprecated options and names (#630) (e2d3999)
  • replay a recorded HAR, or the HAR of the spec, with cy.replayHar (#656) (9ee8557)
  • replay each test of the spec with the entries it sent (#663) (f6bc2b3)
  • require cypress 14 or later (#620) (aeb38ca)
  • require Node.js 20.19+ or 22.12+ (#619) (b3ff432)
  • require TypeScript 5.0 or later (#621) (0a9d093)
  • wait for the network to be idle before saving a HAR by default (#647) (c8a74aa)

Bug Fixes

  • keep the cause and stack of errors in logs and thrown errors (#675) (dd6e7ba)
  • record why a response body is missing as content._error (#648) (8a94816)

Performance Improvements

  • write the HAR in fewer chunks and keep a _testref set by the transform (#664) (c82c587)

Documentation

  • add a migration guide from version 5 (#674) (b9f69cd)
  • add a recipe to cut long bodies (#670) (4f52d9d)
  • describe the version 6 log format in the migration guide (#676) (8b67321), closes #675
  • document the public API in its types (#671) (f58acf9)
  • readme: drop the pre-Cypress-10 plugins file setup (#618) (062c5af)
  • readme: list the version 6 requirements plainly (#631) (ce47466), closes #629
  • show current use cases in the example usage (#673) (81df2cf)