-
-
Notifications
You must be signed in to change notification settings - Fork 34.2k
module: allow subpath imports that start with #/
#60864
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
Conversation
It's a common ecosystem pattern to map a source root directory to `@/` but it requires special tooling support. This turns `#/*` into a more realistic alternative for that pattern.
|
Review requested:
|
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #60864 +/- ##
==========================================
- Coverage 88.54% 88.51% -0.04%
==========================================
Files 703 703
Lines 208262 208393 +131
Branches 40170 40198 +28
==========================================
+ Hits 184408 184454 +46
- Misses 15861 15928 +67
- Partials 7993 8011 +18
🚀 New features to boost your workflow:
|
|
From the perspective of adding support for a new module resolution flavour to TS et al, should this either be semver-major or >=v25.x-only? |
Since this only turns a previous import error into a non-error case, this seems safe to backport pretty aggressively. From the TS perspective, I would expect it to show up in the |
#/#/
|
CI is clean. Added a change entry to the docs for subpath imports to track version support for this change. |
d3b6ceb to
9f4d8ec
Compare
GeoffreyBooth
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this is fine, but did we dig up the reason for the exclusion in the first place?
|
Short answer: no. I did try to look around a bit but I couldn't really find one. The behavior was introduced in the original PR (#34117) and @guybedford's reason seemed to be caution but not necessarily explicit risks:
|
|
@hybrist just curious, has this yet been backported to v24 branch? |
It doesn't require backporting, but won't land in v24.x until it's been landed on the active branch for a period first. |
|
@chrisbbreuer please stop. |
|
@nodejs/moderation is there something we can do to stop this spamming of references from this @chrisbbreuer. |
|
Thanks for notifying me. This "chrisbbreuer" will resolve it. On a different note, we are civilized people @ovflowd. Keep your passive aggressive tone to yourself because this clearly wasn't an intention. |
With all due respect, you spammed 200+ comments on this repository. You have no say here and I couldn't care less about your demands. (Don't invade someone's else's home and start demanding things in a passive aggressive tone yourself) On a different note, I'm not a native English speaker, the "this" preceding your handle was my attempt of not assuming your pronouns. |
It's a common ecosystem pattern to map a source root directory to
@/but it requires special tooling support. This turns#/*into a more realistic alternative for that pattern.See: #49182