Fix interpreting some external modules being interpreted as internal modules#794
Fix interpreting some external modules being interpreted as internal modules#794ljharb merged 1 commit intoimport-js:masterfrom
Conversation
…ernal modules Fixes import-js#793. - Add skipped test to expect scoped internal packages to be "internal"
|
@ephys Do you mind rebasing your branch? |
|
Is there anything Is there anything I can do to help push this along? |
3 similar comments
|
ping-a-doodle-reno |
|
@ephys would you mind rebasing this (on the command line, so there's no merge commits)? @benmosher / @jfmengels, it'd be great if we could get a look at this within the next week or so, so it can be merged ❤️ |
|
@ephys any chance to rebase it? |
|
@kusmierz Yes, it's on my backlog for this week :) Sorry very busy week as usual |
|
Apart from the (unrelated I hope) failed check, all should be good |
|
@ephys FYI got a changelog conflict |
|
😿 dreams... 😸 |
7a330f5 to
e319f78
Compare
1 similar comment
|
Is this expect to be merged at some point in the near future? |
|
@krvajal it's still waiting for @ephys to address |
|
@ljharb it has been seven month already and no reply. You can either close the PR or allow someone to address the requested changes |
|
@krvajal doesn't matter if it takes years. If someone else wants to help complete the PR, they're welcome to post a link to their commits here, and I'll pull them into the PR branch (please do not open a new PR). |
|
I'm very sorry to be the source of the delay. I had completely forgotten about this PR. |
| return !path || folders.some(folder => -1 < path.indexOf(join(folder, name))) | ||
|
|
||
| // extract the part before the first / (redux-saga/effects => redux-saga) | ||
| const packageName = name.match(/([^/]+)/)[0] |
There was a problem hiding this comment.
Can you use const base = baseModule(name) instead, like in isBuiltIn? That appears to handle scoped packages.
|
@ephys This was approved a while back. Has this effort been abandoned? |
3b453b4 to
e9544f8
Compare
This test was added and skipped in import-js#794 (probably since it was failing then), but it's not failing anymore on current master
This test was added and skipped in import-js#794 (probably since it was failing then), but it's not failing anymore on current master
This test was added and skipped in import-js#794 (probably since it was failing then), but it's not failing anymore on current master
This test was added and skipped in import-js#794 (probably since it was failing then), but it's not failing anymore on current master
This test was added and skipped in import-js#794 (probably since it was failing then), but it's not failing anymore on current master
Checklist:
update docsFixes #793
It was fixed by making
isExternalPathsearch for<module_dir>/<package_name>(e.g.node_modules/redux-saga) instead of<module_dir>/<package_name>/<file_name>(e.g.node_modules/redux-saga/effects) in the resolved path.I'd argue that the new solution is still not optimal, as it will fail if an external module has a
mainfield which links to another external module.Should we instead just check that the beginning of the resolved path is the resolved path for the external module folder ? I can make a PR with that alternate solution if requested.
You also might want to check the way I implemented the tests as they might not be an optimal solution.
Edit: The build is failing but was already failing before I started writing code, should I be worried about this ? I don't think it's related to anything I did