Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: add configurable maxBuffer option to runDiffImageToSnapshot #344

Merged
merged 2 commits into from
Dec 11, 2023

Conversation

haze
Copy link
Contributor

@haze haze commented Dec 11, 2023

Description

Adds a new option maxChildProcessBufferSizeInBytes. This lets us override the maximum allowed byte count for stderr/stdout for diff-screenshot child processes.

Motivation and Context

One of my projects routinely diffs large (>4k) images. The default 10 MB limit is too small for my use case.

How Has This Been Tested?

Privately tested in a fork before upstreaming changes; Configuration change means we no longer run into the default limit. Updated tests.

Types of Changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • Documentation (adding or updating documentation)
  • Dependency update

Checklist:

  • My change requires a change to the documentation and I have updated the documentation accordingly.
  • My changes are in sync with the code style of this project.
  • There aren't any other open Pull Requests for the same issue/update.
  • These changes should be applied to a maintenance branch.
  • I have added the Apache 2.0 license header to any new files created.

What is the Impact to Developers Using Jest-Image-Snapshot?

There should be no discernible impact beyond additional configurability.

@dogpatch626
Copy link
Contributor

Will need updates to readme

@haze haze marked this pull request as draft December 11, 2023 20:10
@haze haze force-pushed the hb/configurable-max-diff-buffer branch from 6371fef to f10d37d Compare December 11, 2023 20:46
@haze haze marked this pull request as ready for review December 11, 2023 20:47
@dogpatch626 dogpatch626 requested review from a team and removed request for a team December 11, 2023 20:53
@JAdshead JAdshead merged commit befad8b into americanexpress:main Dec 11, 2023
10 checks passed
oneamexbot added a commit that referenced this pull request Dec 11, 2023
# [6.4.0](v6.3.0...v6.4.0) (2023-12-11)

### Features

* add configurable maxBuffer option to runDiffImageToSnapshot ([#344](#344)) ([befad8b](befad8b))
@oneamexbot
Copy link
Contributor

🎉 This PR is included in version 6.4.0 🎉

The release is available on:

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants