Skip to content

Commit c3bd498

Browse files
committed
Start adding ember-observer searches and declarations of usage / migration for each of the APIs with no replacements
1 parent 8d88069 commit c3bd498

File tree

1 file changed

+15
-9
lines changed

1 file changed

+15
-9
lines changed

text/1003-deprecation-import-ember-from-ember.md

+15-9
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@ A good few already have available imports though.
7474
| | API | import |
7575
| - | --- | ------ |
7676
|🔒| `Ember.meta` | `import { meta } from '@ember/-internals/meta';` |
77-
|🌐| `Ember.VERSION` | none |
77+
|🌐| `Ember.VERSION` | none, we should add one, `@ember/version` |
7878
|🔒| `Ember._captureRenderTree` | `import { captureRenderTree } from '@ember/debug';` |
7979
|🔒| `Ember.instrument` | `import { instrument } from '@ember/instrumentation';` |
8080
|🔒| `Ember.subscribe` | `import { subscribe } from '@ember/instrumentation';` |
@@ -100,19 +100,25 @@ import { macroCondition, isDevelopingApp, importSync } from '@embroider/macros';
100100
if (macroCondition(isDevelopingApp())) {
101101
// maybe this is side-effecting and installs
102102
// some functions on `globalThis` that the inspector could call
103+
// since the inspector can't import modules from a built app.
103104
importSync('@ember/inspector-support');
104105
}
105106
```
106107

107108
### No replacements.
108109

109-
Applies to both the value and type exports (if applicable).
110+
Applies to both the value and type exports (if applicable). All of these will not be re-exported from other `@ember/*` packages, but the following tables will show addon usage[^why-addon-usage] in the ecosystem and potential paths forward for library authors.
110111

111-
- 🫣 `Ember._getPath`
112-
- 🫣 `Ember.isNamespace`
113-
- 🫣 `Ember.toString`
114-
- 🔒 `Ember.Container`
115-
- 🔒 `Ember.Registry`
112+
[^why-addon-usage]: Addons are notorious for doing things they shouldn't, accessing private APIs, doing crazy things so users don't have to, working around ecosystem and broader ecosystem problems etc. It's also expected that addon authors will be able to handle migrations more quickly than app devs.
113+
114+
115+
| | API | Usage | Migration |
116+
| - | --- | ----- | --------- |
117+
|🫣 | `Ember._getPath` | EmberObserver: [None](https://emberobserver.com/code-search?codeQuery=Ember._getPath) | n/a |
118+
|🫣 | `Ember.isNamespace` | EmberObserver: [None](https://emberobserver.com/code-search?codeQuery=Ember.isNamespace) | n/a |
119+
|🫣 | `Ember.toString` | EmberObserver: [None](https://emberobserver.com/code-search?codeQuery=Ember.toString) | n/a |
120+
|🔒 | `Ember.Container` | EmberObserver: [Many, but old or docs](https://emberobserver.com/code-search?codeQuery=Ember.Container) | n/a |
121+
|🔒 | `Ember.Registry` | EmberObserver: [Many, but old or docs](https://emberobserver.com/code-search?codeQuery=Ember.Registry) | n/a |
116122

117123
Internal decorator utils
118124
- 🫣 `Ember._descriptor`
@@ -136,7 +142,7 @@ Mixins
136142
Utility
137143
- 🫣 `Ember.lookup`
138144
- 🌐 `Ember.libraries` -
139-
App authors could choose to use any webpack or other build plugin that collections this information, such as [webpack-node-modules-list](https://github.com/ubilabs/webpack-node-modules-list). This additionally means that V1 libraries that pushed themselves into `Ember.libraries` no longer need to worry about interacting with this or any similar API.
145+
App authors could choose to use any webpack or other build plugin that collections this information, such as [webpack-node-modules-list](https://github.com/ubilabs/webpack-node-modules-list) or [unplugin-info](https://github.com/yjl9903/unplugin-info). This additionally means that V1 libraries that pushed themselves into `Ember.libraries` no longer need to worry about interacting with this or any similar API.
140146
- 🫣 `Ember._Cache`
141147
- 🔒 `Ember.GUID_KEY`
142148
- 🔒 `Ember.canInvoke`
@@ -165,7 +171,6 @@ Utility
165171
- 🔒 `Ember.generateGuid`
166172
- 🌐 `Ember.uuid`
167173
- 🔒 `Ember.wrap`
168-
- 🫣 `Ember.deprecateFunc`
169174
- 🔒 `Ember.inspect`
170175
- 🫣 `Ember.Debug`
171176
Replaced by some of `@ember/debug` exports.
@@ -244,6 +249,7 @@ Most of this is covered in [RFC #176](https://rfcs.emberjs.com/id/0176-javascrip
244249
|🌐 | `Ember.warn` | `import { warn } from '@ember/debug';` |
245250
|🌐 | `Ember.debug` | `import { debug } from '@ember/debug';` |
246251
|🌐 | `Ember.deprecate` | `import { deprecate } from '@ember/debug';` |
252+
|🫣 | `Ember.deprecateFunc` | `import { deprecateFunc } from '@ember/debug';` |
247253
|🌐 | `Ember.runInDebug` | `import { runInDebug } from '@ember/debug';` |
248254
|🌐 | `Ember.Debug.registerDeprecationHandler` | `import { registerDeprecationHandler } from '@ember/debug';` |
249255
|🌐 | `Ember.ContainerDebugAdapter` | `import ContainerDebugAdapter from '@ember/debug/container-debug-adapter';` |

0 commit comments

Comments
 (0)