-
-
Notifications
You must be signed in to change notification settings - Fork 4.2k
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
[DOC release-3-28] Add missing deprecation urls #19754
Closed
Closed
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
The recently modules API update means we are now loading real modules, not polyfills based on the global. This means that the modules themselves are _eagerly required_, rather than being references to a value on the global. For example, previously, this: ```js import { registerWaiter } from '@ember/test'; if (someCondition) { registerWaiter(() => {}); } ``` Would become this: ```js if (someCondition) { Ember.Test.registerWaiter(() => {}); } ``` In either example, `registerWaiter` may or may not be called based on the state of `someCondition`. However, in the second case, if `Ember.Test` is not defined at all, it's completely ok as long as `someCondition` is `false`. It's never called, so we never get an error telling us `Ember.Test` is undefined. Without the transform, the module is eagerly required, along with all of its dependencies. If no one included `ember-testing`, then that means it will throw an error immediately. This PR makes the `@ember/test` module load `ember-testing` lazily, and if it's not available (e.g. in a production environment) it replaces the values with a function that throws a helpful error.
* Unify deprecation ids * Add missing `url` and `since` * Correctly reference `@ember/legacy-built-in-components` addon * Error instead for `<LinkTo @href=...>`
(cherry picked from commit 8e57edd)
Makes the hash helper's individual keys lazy so that they do not eagerly incur costs. (cherry picked from commit 7d334cf)
Makes all {{hash}} object properties settable, but deprecates setting them. (cherry picked from commit ec4c034)
(cherry picked from commit e19e975)
(cherry picked from commit 692c3b8)
(cherry picked from commit c69365b)
(cherry picked from commit 844c2f4)
(cherry picked from commit e28a201)
Example message: ``` Usage of the Ember Global is deprecated. You should import the Ember module or the specific API instead. See https://deprecations.emberjs.com/v3.x/#toc_ember-global for details. Usages of the Ember Global may be caused by an outdated ember-cli-babel dependency. The following steps may help: * Upgrade your `devDependencies` on `ember-cli-babel` to `^7.26.6`. * Upgrade the following addons to the latest version: * active-model-adapter * ember-animated * ember-async-await-helper * ember-attacher * ember-cli-showdown * ember-freestyle * ember-md5 ### Important ### In order to avoid repeatedly showing the same deprecation messages, no further deprecation messages will be shown for usages of the Ember Global until ember-cli-babel is upgraded to v7.26.6 or above. To see all instances of this deprecation message at runtime, set the `EMBER_GLOBAL_DEPRECATIONS` environment variable to "all", e.g. `EMBER_GLOBAL_DEPRECATIONS=all ember test`. ### Details ### Prior to v7.26.6, ember-cli-babel sometimes transpiled imports into the equivalent Ember Global API, potentially triggering this deprecation message even when you did not directly reference the Ember Global. The following outdated versions are found in your project: * [email protected], currently used by: * [email protected] * Depends on [email protected] * [email protected], currently used by: * [email protected] * Depends on ember-cli-babel@^6.8.2 * [email protected] * Depends on ember-cli-babel@^6.17.0 * Added by [email protected] * [email protected] * Depends on ember-cli-babel@^6.16.0 * [email protected] (Dormant) * Depends on ember-cli-babel@^6.16.0 * [email protected] * Depends on ember-cli-babel@^6.8.1 * [email protected] * Depends on ember-cli-babel@^6.0.0 * Added by [email protected] * [email protected] (Dormant) * Depends on ember-cli-babel@^6.0.0-beta.4 * Added by [email protected] * [email protected] (Dormant) * Depends on ember-cli-babel@^6.6.0 * Added by [email protected] * [email protected] * Depends on ember-cli-babel@^6.6.0 * Added by [email protected] > [email protected] * [email protected] (Dormant) * Depends on ember-cli-babel@^6.9.0 * Added by [email protected] * [email protected], currently used by: * @embroider/[email protected] (Compatible) * Depends on ember-cli-babel@^7.23.0 * Added by [email protected] * Added by [email protected] * direwolf (your app) * Depends on [email protected] * [email protected] (Compatible) * Depends on ember-cli-babel@^7.23.0 * [email protected] (Compatible) * Depends on ember-cli-babel@^7.23.0 * [email protected] (Compatible) * Depends on ember-cli-babel@^7.23.0 * [email protected] (Compatible) * Depends on ember-cli-babel@^7.23.0 * Added by [email protected] * Added by [email protected] * [email protected] (Dormant) * Depends on ember-cli-babel@^7.23.0 * [email protected] (Dormant) * Depends on ember-cli-babel@^7.23.0 Note: Addons marked as "Dormant" does not appear to have any JavaScript files. Therefore, even if they are using an old version ember-cli-babel, they are unlikely to be the cuplrit of this deprecation and can likely be ignored. Note: Addons marked as "Compatible" are already compatible with [email protected]. Try upgrading your `devDependencies` on `ember-cli-babel` to `^7.26.6`. ``` (cherry picked from commit bb9d96e)
Show details about outdated ember-cli-babel and only show the first instance by default. Example message: ``` Using `computed.reads` has been deprecated. Instead, import the value directly from @ember/object/computed: import { reads } from '@ember/object/computed'; These usages may be caused by an outdated ember-cli-babel dependency. The following steps may help: * Upgrade the following addons to the latest version: * active-model-adapter * ember-animated * ember-async-await-helper * ember-attacher * ember-cli-showdown * ember-md5 ### Important ### In order to avoid repeatedly showing the same deprecation messages, no further deprecation messages will be shown for theses deprecated usages until ember-cli-babel is upgraded to v7.26.6 or above. To see all instances of this deprecation message, set the `EMBER_RUNLOOP_AND_COMPUTED_DOT_ACCESS_DEPRECATIONS` environment variable to "all", e.g. `EMBER_RUNLOOP_AND_COMPUTED_DOT_ACCESS_DEPRECATIONS=all ember test`. ### Details ### Prior to v7.26.6, ember-cli-babel sometimes transpiled imports into the equivalent Ember Global API, potentially triggering this deprecation message indirectly, even when you did not observe these deprecated usages in your code. The following outdated versions are found in your project: * [email protected], currently used by: * [email protected] * Depends on [email protected] * [email protected], currently used by: * [email protected] * Depends on ember-cli-babel@^6.8.2 * [email protected] * Depends on ember-cli-babel@^6.17.0 * Added by [email protected] * [email protected] * Depends on ember-cli-babel@^6.16.0 * [email protected] (Dormant) * Depends on ember-cli-babel@^6.16.0 * [email protected] * Depends on ember-cli-babel@^6.8.1 * [email protected] * Depends on ember-cli-babel@^6.0.0 * Added by [email protected] * [email protected] (Dormant) * Depends on ember-cli-babel@^6.0.0-beta.4 * Added by [email protected] * [email protected] (Dormant) * Depends on ember-cli-babel@^6.6.0 * Added by [email protected] * [email protected] * Depends on ember-cli-babel@^6.6.0 * Added by [email protected] > [email protected] * [email protected] (Dormant) * Depends on ember-cli-babel@^6.9.0 * Added by [email protected] Note: Addons marked as "Dormant" does not appear to have any JavaScript files. Therefore, even if they are using an old version ember-cli-babel, they are unlikely to be the cuplrit of this deprecation and can likely be ignored. ``` (cherry picked from commit 7a8ab95)
(cherry picked from commit 72c3fd7)
(cherry picked from commit 1d49ea9)
Ensures that computeds can depend on dynamic hash keys that did not exist on the original hash. (cherry picked from commit 628a928)
(cherry picked from commit 926452f)
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) Refactors the work in #19557 to address some of the recent comments there. (cherry picked from commit 5ad6f79)
(cherry picked from commit fcf2a64)
(cherry picked from commit fe32020)
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 57907a4)
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. (cherry picked from commit 03b20d8)
Restores the previous hash behavior where `hash` will lazily update in templates, but eagerly evaluate and create a POJO in JS. Also preserves the deprecation on setting on the hash. (cherry picked from commit a23c71e)
(cherry picked from commit 238e016)
In Ember 3.24 various string methods added to the `String.prototype` were deprecated for removal in Ember 4.0. `htmlSafe` (the version available via string prototype) was supposed to be included in those deprecations, however dues to its implementation being different it was missed. This omission can be understood as a bug. This patch deprecates `String.prototype.htmlSafe` targeting Ember 4.0. This will allow the removal of *all* string prototype extensions in 4.0 as intended by the original deprecation. See also: #19654 (comment) (cherry picked from commit c6c6978)
Add `HAS_NATIVE_PROXY` guard to test
(cherry picked from commit b3559e4)
@jenweber You can target the release branch |
@jenweber do we still need this? :D |
No longer relevant. Sorry for letting it slide! |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Along the way, we missed adding some deprecation guides and URLs. This PR adds some that were missing, so that they can be part of LTS experience in 3.28.
Relates to #19617
Partially addresses ember-learn/deprecation-app#893
I want this PR to target v3.28/
lts-3-28
, but there doesn't seem to be a branch for that yet. Please feel free to change the base once it exists. Don't merge it intomaster
. Thank you!