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

Refactor scenario helpers to a shared location #1454

Merged
merged 1 commit into from
Jun 19, 2023

Conversation

NullVoxPopuli
Copy link
Collaborator

@NullVoxPopuli NullVoxPopuli commented May 30, 2023

this happened mostly because v2 addon watch infra is large, and we don't want its responsibilities mingling with the other helpers.

Aside from changing a relative path reference to having an extra .., there are no code changes.

This should help out @void-mAlex with some addon-dev testing / watching tests


return fixtureStructure;
}
export * from './helpers/index';
Copy link
Collaborator Author

@NullVoxPopuli NullVoxPopuli May 30, 2023

Choose a reason for hiding this comment

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

at some point in node's history, implicit index is no longer available to use? I'd seen this in my ESM-node projects 🤷 anyone know why this has happened? did node folks decide that implicit index isn't a good idea? is it a configuration issue?

This file now emulates that behavior (and mostly to avoid having to change all the scenario tests to use ./helpers/index)

Copy link
Member

Choose a reason for hiding this comment

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

I don't think this is a node thing in this context 😂 I'm pretty sure this whole import * and export * is a typescript specific thing that is pretty annoying if you ask me since it messes with true ESM semantics

Copy link
Member

Choose a reason for hiding this comment

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

also I'm pretty sure that ESM wants you to always do file-based imports anyway because realistically you can't do the "is this a file or is this a folder with an index in it" logic all that efficiently on the web

@NullVoxPopuli NullVoxPopuli changed the title Refactor helpers to a shared location so that we don't have too big o… Refactor scenario helpers to a shared location May 30, 2023
@NullVoxPopuli NullVoxPopuli marked this pull request as ready for review June 7, 2023 14:55
…f a file (this happened mostly because v2 addon watch infra is large, and we don't want its responsibilities mingling with the other helpers -- no code changes have been made -- only function moves

Update relative directory reference since fixtures helpers are now in a directory
@NullVoxPopuli NullVoxPopuli merged commit 9b83c11 into embroider-build:main Jun 19, 2023
@NullVoxPopuli NullVoxPopuli deleted the refactor-helpers branch June 19, 2023 18:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants