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

Remove deprecated getWithDefault for v4.0 #19620

Closed
wants to merge 35 commits into from
Closed

Remove deprecated getWithDefault for v4.0 #19620

wants to merge 35 commits into from

Conversation

nlfurniss
Copy link
Contributor

@nlfurniss nlfurniss commented Jul 13, 2021

Part of 19617

Deprecation guide.

TEST_SUITE=all yarn test passes locally

Windvis and others added 30 commits May 24, 2021 20:55
This makes sure the `templateOnly` documentation appears in the right place.
[DOC] Link the `templateOnly` docs to the correct package
Ensures that computeds can depend on dynamic hash keys that did not
exist on the original hash.
…computeds

[BUGFIX lts] Ensures that computed can depend on dynamic hash keys
[BUGFIX release] Extend transitionTo deprecation
No logical changes here, just moving the code to detect and generate the
message out into a stand alone module (makes it easier to reason about
and possible to unit test).

Co-authored-by: Stefan Penner <[email protected]>
Co-authored-by: Stefan Penner <[email protected]>
Fixes a few things:

* Ensures that Embroider has a consistent protocol for ensuring the
  global is bootstrapped
* Allows our override code to be transpiled
* Ensures that any bootstrapping tweaks force us out of "prebuilt" mode
  (allowing that customized bootstrap code to actually run)

Co-authored-by: Stefan Penner <[email protected]>
This adds the public `CoreObject` methods to the API docs of the `Helper` class.
Also fixed a few minor errors in the message (wrong version number etc)

Included a list of hardcoded known dormant addons (polyfills mostly) to make
the suggestions more reliable.
(cherry picked from commit e31720c)
[DOC release] Fix "Dormant" addon warning typo
(cherry picked from commit fe32020)
(cherry picked from commit 2392417)
During bubbling, `event.target` may point to a child element whereas
`event.currentTarget` always points to the element where the handler
was attached, which is what we want here.

Reported in a comment on #19546, though this may be a distinct issue
from the original report as it was reported as a default-cancelling
parent element interfering with the nested `<LinkTo>`, and this is
the other way around.
(cherry picked from commit 428e7a0)
The different heading levels are causing issues for services that are trying to read and filter the changelog
(cherry picked from commit 7de1e20)
The previous bugfixes to `{{hash}}` caused a change to the semantics of
computed properties that depend on a hash. Specifically, because
`{{hash}}` objects are now proxies, they are _constant_, never updating
again after they are initially created. This is fine if you depend on
an individual key in a hash, but breaks if you depend directly on the
hash itself:

```js
computed('hash.foo', function() {}) // this works

computed('hash', function() {}) // this will no longer rerun
```

This is used occasionally when you wish to depend on the dynamic keys
of a dictionary, like so:

```js
computed('hash', function() {
  let values = [];

  for (let key in this.hash) {
    values.push(hash[key]);
  }

  return values;
})
```

Notably, this is not a problem with autotracking, because autotracking
will entangle the usage of these keys dynamically. So this is only a
problem with legacy systems such as `computed` and `observer` which
cannot dynamically add dependencies based on the function's runtime.

To fix this, we need to determine if a dependency is a hash when a
computed or an observer depends upon it, and then entangle all of its
keys if it is. We do this whenever the value is the last value in the
chain.
@nlfurniss nlfurniss changed the base branch from master to v4-cleanup July 13, 2021 18:45
@nlfurniss
Copy link
Contributor Author

Lets do this over :-\

@nlfurniss nlfurniss closed this Jul 13, 2021
@nlfurniss nlfurniss deleted the remove-get-with-default branch July 13, 2021 19:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

9 participants