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

fix this.import from node_modules in v1 addons #1488

Merged
merged 2 commits into from
Jun 29, 2023
Merged

Conversation

mansona
Copy link
Member

@mansona mansona commented Jun 29, 2023

As part of #1435 we have moved all vendor code from addons to ./node_modules/.embroider/rewritten-packages/@embroider/synthesized-vendor/, which works when you call this.import() from an addon's included() hook.

Perhaps as a copy & paste error we were ignoring the case where this.import() was called on a file in node_modules, this PR will fix that.

Note: I have committed and pushed a failing test that I will fix in a subsequent commit so that we can see that the issue exists on main and is fixed by the commit 👍

@mansona mansona marked this pull request as ready for review June 29, 2023 14:49
@mansona mansona requested a review from a team June 29, 2023 15:20
@ef4 ef4 merged commit 7532326 into main Jun 29, 2023
@ef4 ef4 deleted the app-import-node-modules branch June 29, 2023 15:34
@ef4
Copy link
Contributor

ef4 commented Jun 29, 2023

Merged, but a thought for next time: it would be good to consolidate scenarios better. Not every test needs a whole app around it and the test suite overhead is considerable.

We could make it clearer that there's a standard scenario for testing app features and a standard scenario for testing addon features and a test like this could be one new test in the addon scenario.

@mansona mansona added the bug Something isn't working label Jun 29, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants