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

Bump enzyme-adapter-preact-pure from 3.1.0 to 4.1.0 #444

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

dependabot[bot]
Copy link
Contributor

@dependabot dependabot bot commented on behalf of github Jan 11, 2023

Bumps enzyme-adapter-preact-pure from 3.1.0 to 4.1.0.

Release notes

Sourced from enzyme-adapter-preact-pure's releases.

v4.1.0

Summary

Add new features behind flags to increase compatibility with React Enzyme adapters

What's Changed

  • Adds a new shallow renderer that more closely matches the behavior of the React 16 shallow renderer. This new renderer can be enabled by importing CompatShallowRenderer from enzyme-adapter-preact-pure/compat and passing it in the ShallowRenderer Adapter option.

    The previous shallow renderer rendered components into a DOM and modified the component's output so that all children return null to prevent rendering further down the tree. The compat shallow renderer is a custom implementation of Preact's diffing algorithm that only shallow renders the given component and does not recurse down the VDOM tree. It's behavior more closely matches the React 16 Enzyme adapter and it well suited for migrating an Enzyme test suite from React to Preact.

  • Support more return types (e.g. booleans, numbers, BigInts) from components

  • Add an option (renderToString) to allow passing in a custom string renderer to use for Enzyme's 'string' renderer instead of rendering into the DOM and reading the HTML output. It is expected that renderToString from preact-render-to-string is passed into this option. This change enables using the string renderer in non-DOM environments and more closely matches the React adapter's behavior.

  • Add a feature flag (simulateEventsOnComponents) for supporting simulating events on Components #211

    This new feature flag turns on behavior that enables calling .simulate directly on Components. For shallow rendering, this directly calls the component's corresponding prop. For mount rendering, it finds the first DOM node in the Component, and dispatches the event from it.

    NOTE: This flag changes the behavior of calling simulate on shallow rendered host (a.k.a DOM) nodes. When this flag is off, simulate dispatches a native DOM event on the host node. When this flag is turned on, simulate directly calls the prop of the event handler with arguments passed to simulate.

    The behavior turned on by this flag matches the behavior of the React 16 Enzyme adapter.

Pull Requests

(bump dependency PRs not included)

New Contributors

Full Changelog: preactjs/enzyme-adapter-preact-pure@v4.0.1...v4.1.0

... (truncated)

Changelog

Sourced from enzyme-adapter-preact-pure's changelog.

[4.1.0] - 2023-01-05

  • Adds a new shallow renderer that more closely matches the behavior of the React 16 shallow renderer. This new renderer can be enabled by importing CompatShallowRenderer from enzyme-adapter-preact-pure/compat and passing it in the ShallowRenderer Adapter option.

    The previous shallow renderer rendered components into a DOM and modified the component's output so that all children return null to prevent rendering further down the tree. The compat shallow renderer is a custom implementation of Preact's diffing algorithm that only shallow renders the given component and does not recurse down the VDOM tree. It's behavior more closely matches the React 16 Enzyme adapter and it well suited for migrating an Enzyme test suite from React to Preact.

  • Support more return types (e.g. booleans, numbers, BigInts) from components

  • Add an option (renderToString) to allow passing in a custom string renderer to use for Enzyme's 'string' renderer instead of rendering into the DOM and reading the HTML output. It is expected that renderToString from preact-render-to-string is passed into this option. This change enables using the string renderer in non-DOM environments and more closely matches the React adapter's behavior.

  • Add a feature flag (simulateEventsOnComponents) for supporting simulating events on Components #211

    This new feature flag turns on behavior that enables calling .simulate directly on Components. For shallow rendering, this directly calls the component's corresponding prop. For mount rendering, it finds the first DOM node in the Component, and dispatches the event from it.

    NOTE: This flag changes the behavior of calling simulate on shallow rendered host (a.k.a DOM) nodes. When this flag is off, simulate dispatches a native DOM event on the host node. When this flag is turned on, simulate directly calls the prop of the event handler with arguments passed to simulate.

    The behavior turned on by this flag matches the behavior of the React 16 Enzyme adapter.

[4.0.1] - 2022-04-15

  • Added a partial fix for an incompatibility between Preact's JSX element type and the JSX element type from @types/react v18. #177.

[4.0.0] - 2022-04-13

  • The CommonJS build of this package now targets ES 2020, which is the same

... (truncated)

Commits
  • b95a01e v4.1.0
  • be390b8 Update changelog (#241)
  • ec2c660 Document new options in Readme (#240)
  • 00a6719 Add example that uses the compat renderer (#236)
  • 1d264f2 Merge pull request #229 from preactjs/dependabot/npm_and_yarn/lint-staged-13.1.0
  • 9af073e Merge pull request #227 from preactjs/dependabot/npm_and_yarn/jsdom-20.0.3
  • 036c962 Merge pull request #230 from preactjs/dependabot/npm_and_yarn/prettier-2.8.1
  • c9237cd Merge pull request #237 from preactjs/dependabot/npm_and_yarn/typescript-esli...
  • e6e8d6e Bump @​typescript-eslint/parser from 5.41.0 to 5.47.1
  • a5279f6 Bump lint-staged from 13.0.3 to 13.1.0
  • Additional commits viewable in compare view
Maintainer changes

This version was pushed to npm by drewigg, a new releaser for enzyme-adapter-preact-pure since your current version.


Dependabot compatibility score

Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


Dependabot commands and options

You can trigger Dependabot actions by commenting on this PR:

  • @dependabot rebase will rebase this PR
  • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
  • @dependabot merge will merge this PR after your CI passes on it
  • @dependabot squash and merge will squash and merge this PR after your CI passes on it
  • @dependabot cancel merge will cancel a previously requested merge and block automerging
  • @dependabot reopen will reopen this PR if it is closed
  • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
  • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
  • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
  • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)

Bumps [enzyme-adapter-preact-pure](https://github.com/preactjs/enzyme-adapter-preact-pure) from 3.1.0 to 4.1.0.
- [Release notes](https://github.com/preactjs/enzyme-adapter-preact-pure/releases)
- [Changelog](https://github.com/preactjs/enzyme-adapter-preact-pure/blob/master/CHANGELOG.md)
- [Commits](preactjs/enzyme-adapter-preact-pure@v3.1.0...v4.1.0)

---
updated-dependencies:
- dependency-name: enzyme-adapter-preact-pure
  dependency-type: direct:development
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <[email protected]>
@dependabot dependabot bot added dependencies Pull requests that update a dependency file javascript Pull requests that update Javascript code labels Jan 11, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
dependencies Pull requests that update a dependency file javascript Pull requests that update Javascript code
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant