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

mount: ensure the root’s ref prop gets attached to the actual root #2259

Merged
merged 1 commit into from
Oct 10, 2019

Conversation

ljharb
Copy link
Member

@ljharb ljharb commented Oct 10, 2019

Fixes #2253.

After merging, this will need adapter-utils bumped and published, and then every adapter's minimum utils version bumped, and then they'll also need a publish.

…the root’s `ref` prop gets attached to the actual root

Fixes enzymejs#2253.
@ljharb ljharb changed the title [enzyme-adapter-react-*, enzyme-adapter-utils] [fix] mount: ensure the root’s ref prop gets attached to the actual root mount: ensure the root’s ref prop gets attached to the actual root Oct 10, 2019
@ljharb ljharb merged commit 7836e57 into enzymejs:master Oct 10, 2019
ljharb added a commit that referenced this pull request Oct 10, 2019
 - [fix] `mount`: ensure the root’s `ref` prop gets attached to the actual root (#2259)
 - [refactor] remove unused code from createMountWrapper; add tests
 - [meta] Update airbnb.io URLs to use https (#2222)
 - [deps] update `airbnb-prop-types`, `function.prototype.name`, `object.fromentries`, `semver`
 - [dev deps] update `eslint`, `eslint-config-airbnb`, `eslint-plugin-react`, `eslint-plugin-import`, `eslint-plugin-jsx-a11y`, `rimraf`, `safe-publish-latest`
@ljharb ljharb deleted the fix_mount_refs branch October 10, 2019 07:50
ljharb added a commit that referenced this pull request Oct 10, 2019
 - [fix] `mount`: ensure the root’s `ref` prop gets attached to the actual root (#2259)
 - [meta] Update airbnb.io URLs to use https (#2222)
 - [deps] update `react-is`, `enzyme-adapter-utils`
 - [dev deps] update `eslint`, `eslint-plugin-react`, `eslint-config-airbnb`, `eslint-plugin-import`, `eslint-plugin-jsx-a11y`, `rimraf`, `safe-publish-latest`
ljharb added a commit that referenced this pull request Oct 10, 2019
 - [fix] `mount`: ensure the root’s `ref` prop gets attached to the actual root (#2259)
 - [meta] Update airbnb.io URLs to use https (#2222)
 - [deps] update `enzyme-adapter-utils`, `react-is`
 - [dev deps] update `eslint`, `eslint-plugin-react`, `eslint-config-airbnb`, `eslint-plugin-import`, `eslint-plugin-jsx-a11y`, `rimraf`, `safe-publish-latest`
ljharb added a commit that referenced this pull request Oct 10, 2019
 - [fix] `mount`: ensure the root’s `ref` prop gets attached to the actual root (#2259)
 - [meta] Update airbnb.io URLs to use https (#2222)
 - [deps] update `enzyme-adapter-utils`, `react-is`
 - [dev deps] update `eslint`, `eslint-plugin-react`, `eslint-config-airbnb`, `eslint-plugin-import`, `eslint-plugin-jsx-a11y`, `rimraf`, `safe-publish-latest`
ljharb added a commit that referenced this pull request Oct 11, 2019
 - [fix] `mount`: ensure the root’s `ref` prop gets attached to the actual root (#2259)
 - [deps] update `enzyme-adapter-utils`, `react-is`
@eps1lon
Copy link
Contributor

eps1lon commented Oct 13, 2019

Isn't this exactly what I wanted to do in #2101 originally which wasn't deemed backwards compat safe?

@ljharb
Copy link
Member Author

ljharb commented Oct 14, 2019

@eps1lon you're right that it's trying to solve the same problem, and in a very similar way - i believe I did it in a backwards compatible way here, and I admit I forgot #2101 existed when working on this :-/

However, #2101 may be worth rebasing to better handle React 0.13, if you're willing.

@eps1lon
Copy link
Contributor

eps1lon commented Oct 14, 2019

However, #2101 may be worth rebasing to better handle React 0.13, if you're willing.

I won't have the time for that. But thanks for releasing this. Allowed us to remove a couple of seemingly useless fragments 👍

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