Conversation
ad81146 to
05c4ada
Compare
rwjblue
left a comment
There was a problem hiding this comment.
Looking really good! Only had a few inline comments
packages/container/lib/container.js
Outdated
| // pass it to the resolve without the source | ||
| normalizedName = expandedFullName; | ||
| options = {}; | ||
| if (!EMBER_MODULE_UNIFICATION) { |
There was a problem hiding this comment.
This should be passed to the assertion below (instead of a separate conditional)
packages/container/lib/container.js
Outdated
| let normalizedName = fullName; | ||
| if (options.source) { | ||
| let expandedFullName = container.registry.expandLocalLookup(fullName, options); | ||
| if (!EMBER_MODULE_UNIFICATION) { |
There was a problem hiding this comment.
Should be part of assertion condition
| const { owner, moduleName } = meta; | ||
|
|
||
| const options: LookupOptions | undefined = makeOptions(moduleName); | ||
| const {name, namespace} = this._parseNameForNamespace(_name); |
There was a problem hiding this comment.
Can you guard this in the feature flag?
| } | ||
|
|
||
| private _lookupComponentDefinition(_name: string, meta: OwnedTemplateMeta): Option<ComponentDefinition> { | ||
| let {name, namespace} = this._parseNameForNamespace(_name); |
There was a problem hiding this comment.
Please guard this in the feature flag?
| if (namespaceDelimiterOffset === -1) { | ||
| this.name = name; | ||
| this.namespace = undefined; | ||
| } else { |
There was a problem hiding this comment.
Let’s tweak this else case to ensure it’s feature flagged
There was a problem hiding this comment.
This is already guarded in: https://github.com/emberjs/ember.js/pull/16240/files#diff-11c397e816cb737423d40c0a91104f5fR40
packages/ember-runtime/lib/inject.js ensures that options is only passed if the feature flag is enabled 👍
39bdf15 to
404ca53
Compare
404ca53 to
e4fab05
Compare
Replaces #16158
This commit adds support for invoking a component or injecting a service from a module unification namespace. It is in alignment with RFC #309.
Use
::to delimit namespaces from the name of an invocation or injection. For example: