-
-
Notifications
You must be signed in to change notification settings - Fork 104
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
Fix resolving @scope/name
namespaces
#531
Merged
Merged
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
buschtoens
force-pushed
the
scoped-namespaces
branch
from
March 30, 2020 16:11
90831ff
to
5509220
Compare
I seem to have fixed it. 🤔 All existing tests are still passing and the newly added tests pass as well. |
CI is failing for an unrelated reason:
Fixing in #532. |
Merged
Assuming CI is fixed (#532), would this PR be mergeable? Is there something I need to improve or do we not want to support this in the first place? |
buschtoens
force-pushed
the
scoped-namespaces
branch
from
April 11, 2020 14:56
5509220
to
490289f
Compare
The PR is rebased and CI is passing. ✅ |
Thank you @buschtoens! |
Awesome! Thank you for merging this! 💖 |
rwjblue
changed the title
fix: resolving
Fix resolving Apr 11, 2020
@scope/name
namespaces@scope/name
namespaces
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.
It is possible resolve modules from other packages using namespaces. For instance, the following looks up the
intl
service directly from theember-intl
package:Notably, this instance is
!==
to theapp
re-export that is merged with the host app:This is expected behavior.
So generalizing, the pattern for looking up something from a foreign package is:
Unfortunately, this does not work for packages that have a scoped name, e.g.
@corp/fancy-addon
.The invocation would look like:
parseName(fullNane)
does not support this, as it was written before package scopes were introduced and only expected a single@
to be present.ember-resolver/addon/resolvers/classic/index.js
Lines 41 to 91 in 59d6e19
This PR, so far, adds failing tests for scoped package names.
Is this something that we would want to fix? I personally have an interest in it and would finish the PR, if so.
Related