Skip to content
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

Bug/issue 820 deeply relative ESM paths in node modules not working #832

Conversation

thescientist13
Copy link
Member

@thescientist13 thescientist13 commented Dec 21, 2021

Related Issue

resolves #820

Summary of Changes

  1. Refactored out usages of .replace('./', '') with custom functionality to better handle ./ vs ../ using @stencil/core for validation
  2. Added tests and did some minor refactoring / commenting including not running walkModule on packages that already provide an exports map
  3. Cleaning up import map snapshot to remove false positive entries

TODO

  1. Sanity test first pass in downstream projects
  2. Test with @stencil/core for handling ../ paths
  3. Fix windows build - lol, I was way overthinking it. I was just about forcing windows path separators (\) to ESM style (/)
  4. Final sanity test again in downstream projects
  5. Misc TODOs / comment cleanup - deferred to leverage import.meta.resolve to support import maps generation and accurate node_modules resolution when building #684
  6. (stretch) Test with @stencil/core for handling assumed barrel paths (files that assume resolving to a root level index.js via bare specifier (likely will make its own issue as it is a lower priority) - tracked in auto-resolve dependencies that only import from a directory #907

@thescientist13 thescientist13 added bug Something isn't working CLI labels Dec 21, 2021
@thescientist13 thescientist13 self-assigned this Dec 21, 2021
@thescientist13 thescientist13 changed the title Bug/issue 820 deeply relative esm paths node modules break Bug/issue 820 deeply relative esm paths in node modules not working Dec 28, 2021
@thescientist13 thescientist13 changed the title Bug/issue 820 deeply relative esm paths in node modules not working Bug/issue 820 deeply relative ESM paths in node modules not working Dec 28, 2021
@thescientist13 thescientist13 force-pushed the bug/issue-820-deeply-relative-ESM-paths-node-modules-break branch from 2ea7a95 to e94dcd0 Compare February 26, 2022 18:09
@thescientist13 thescientist13 marked this pull request as ready for review February 26, 2022 18:22
@thescientist13 thescientist13 removed their assignment Mar 3, 2022
@thescientist13 thescientist13 force-pushed the bug/issue-820-deeply-relative-ESM-paths-node-modules-break branch from 0cf1fe7 to 459235d Compare March 5, 2022 15:55
@thescientist13 thescientist13 merged commit 7697047 into master Mar 5, 2022
@thescientist13 thescientist13 deleted the bug/issue-820-deeply-relative-ESM-paths-node-modules-break branch March 5, 2022 16:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working CLI
Projects
None yet
1 participant