This release is the biggest change to the library since its release. Major features and changes:
It adds the ability to opt into lazy autotracking semantics—that is, normal autotracking semantics—with both function- and class-based modifiers:
For function-based modifiers, pass a new { eager: false } option to modifier() when defining a modifier.
For class-based modifiers, switch to the new modify() hook (which is mutually exclusive with the existing lifecycle hooks).
It deprecates all existing lifecycle hooks on class-based modifiers. To migrate away, you should use the new modify() hook for modifier-specific lifecycle and the @ember/destroyable APIs for the old willDestroy() hook and fields.
It also deprecates the this.args and this.element accessors on class-based modifiers
The result is an API which is well-aligned with other core Ember APIs—especially helpers. Function-based helpers and modifiers now have the same basic signature, except that modifiers receive an element as their first argument, and class-based helpers and modifiers have the same basic shape as well, except that modifiers have a modify() hook which receives an element as its first argument instead of a compute() hook.
For full details, see the changelog below, and consult the migration guide for how to upgrade your code!
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 ember-modifier from 3.1.0 to 3.2.2.
Release notes
Sourced from ember-modifier's releases.
... (truncated)
Changelog
Sourced from ember-modifier's changelog.
... (truncated)
Commits
95d7885
Release 3.2.2f71de9d
Merge pull request #253 from ember-modifier/dont-trust-anyone7948bf0
Check type of teardown before saving or using iteb0ca29
Merge pull request #252 from ember-modifier/fix-deprecationfdfb7ce
Invert deprecation for missing optionse493019
Merge pull request #240 from ember-modifier/dependabot/npm_and_yarn/v3/typesc...f958f07
Update Class-based modifier example9a69a51
Bump@typescript-eslint/eslint-plugin
from 5.16.0 to 5.17.07b8f1d1
Merge pull request #241 from ember-modifier/dependabot/npm_and_yarn/v3/typesc...1e12f28
Merge pull request #242 from ember-modifier/dependabot/npm_and_yarn/v3/qunit-...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)