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

Eagerly virtualize emberVirtualPackages #1495

Merged
merged 5 commits into from
Jun 30, 2023
Merged

Conversation

ef4
Copy link
Contributor

@ef4 ef4 commented Jun 29, 2023

... and expand the list of virtual pacakges to includes some that are private-but-used-API.

Before this, we only provided these as fallbacks when normal resolving failed, and this mostly worked. But that was when we were also rewriting the entire node_modules graph on disk. Now that we don't do that, there are many more opportunities to accidentally resolve copies of packages that aren't really what you expected.

ef4 added 3 commits June 29, 2023 18:49
... and expand the list of virtual pacakges to includes some that are private-but-used-API.

Before this, we only provided these as fallbacks when normal resolving failed, and this mostly worked. But that was when we were also rewriting the entire node_modules graph on disk. Now that we don't do that, there are many more opportunities to accidentally resolve copies of packages that aren't really what you expected.
@@ -37,6 +37,11 @@ emberVirtualPackages.add('@embroider/macros');
// the modules-api-polyfill. Newer APIs need to be added here.
emberVirtualPackages.add('@ember/owner');

// these are not public API but they're included in ember-source, so for
// correctness we still want to understand that they come from there.
emberVirtualPackages.add('@glimmer/validator');
Copy link
Collaborator

@NullVoxPopuli NullVoxPopuli Jun 30, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

should all the glimmer packages from ember-source be listed here?

  • @glimmer/compiler
  • @glimmer/syntax
  • etc?

or is it best to only add if someone brings it up? 😅

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It would be good to be complete. Also it would be good to make these lists ember-version-dependent.

...and bumping tsconfig target because I wanted to use replaceAll and it definitely works in our supported node
@ef4 ef4 merged commit 7bd035f into main Jun 30, 2023
194 checks passed
@ef4 ef4 deleted the externalize-ember-virtual-modules branch June 30, 2023 03:34
@ef4 ef4 added the bug Something isn't working label Jun 30, 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.

2 participants