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

fix(function-resource): lifecycle fixes #531

Merged
merged 2 commits into from
Jun 18, 2022
Merged

Conversation

NullVoxPopuli
Copy link
Owner

Resolves an issue where, when a function-resource is directly used in a template,
the lifecycle of invoking and running cleanup was incorrect when wrapped
in an if statement (or any conditional rendering situation). Now, when
a resource used within {{ ... }} is removed from the render tree, the
cleanup hook will run.

@cloudflare-workers-and-pages
Copy link

cloudflare-workers-and-pages bot commented Jun 14, 2022

Deploying with  Cloudflare Pages  Cloudflare Pages

Latest commit: c29d04e
Status: ✅  Deploy successful!
Preview URL: https://5279d4c0.ember-resources.pages.dev
Branch Preview URL: https://fix-resource-lifecycles.ember-resources.pages.dev

View logs

@github-actions
Copy link
Contributor

github-actions bot commented Jun 14, 2022

Estimated impact to a consuming app, depending on which bundle is imported

js min min + gzip min + brotli
/core/index.js 4.21 KiB 1.89 KiB 898 B 763 B
/util/debounce.js 2.67 KiB 797 B 415 B 348 B
/util/ember-concurrency.js 5.39 KiB 1.6 KiB 748 B 635 B
/util/function-resource.js 11.18 KiB 3.04 KiB 1.16 KiB 962 B
/util/function.js 4.09 KiB 1.83 KiB 720 B 615 B
/util/helper.js 1.8 KiB 303 B 218 B 177 B
/util/map.js 5.83 KiB 2.48 KiB 1.02 KiB 878 B
/util/remote-data.js 5.01 KiB 1.83 KiB 705 B 618 B

@NullVoxPopuli NullVoxPopuli force-pushed the fix-resource-lifecycles branch 2 times, most recently from b5c6d9d to d5e19fc Compare June 17, 2022 19:53
Resolves an issue where, when a function-resource is directly used in a template,
the lifecycle of invoking and running cleanup was incorrect when wrapped
in an if statement (or any conditional rendering situation).  Now, when
a resource used within `{{ ... }}` is removed from the render tree, the
cleanup hook will run.
@NullVoxPopuli NullVoxPopuli force-pushed the fix-resource-lifecycles branch 4 times, most recently from ac6ebff to a9415fe Compare June 17, 2022 22:43
@NullVoxPopuli NullVoxPopuli marked this pull request as ready for review June 17, 2022 22:50
@NullVoxPopuli NullVoxPopuli force-pushed the fix-resource-lifecycles branch 2 times, most recently from 3d4b88a to 6a2b38c Compare June 18, 2022 00:24
@NullVoxPopuli NullVoxPopuli force-pushed the fix-resource-lifecycles branch from 6a2b38c to c29d04e Compare June 18, 2022 00:32
@NullVoxPopuli NullVoxPopuli merged commit 66aab6a into main Jun 18, 2022
@NullVoxPopuli NullVoxPopuli deleted the fix-resource-lifecycles branch June 18, 2022 00:49
@github-actions
Copy link
Contributor

🎉 This PR is included in version 4.9.1 🎉

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
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant