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: Move @ember/test-waiters to peerDependencies #412

Merged

Conversation

patocallaghan
Copy link
Contributor

Follow up to #407 (comment)

image

@patocallaghan patocallaghan changed the title Move @ember/test-waiters to peerDependencies fix: Move @ember/test-waiters to peerDependencies Feb 25, 2022
@NullVoxPopuli
Copy link
Owner

NullVoxPopuli commented Feb 26, 2022

aw man, I thought this was resolved. 🙃
thanks for opening this PR!

I need to figure out why @ember/test-waiters is now missing / unresolveable

@NullVoxPopuli
Copy link
Owner

so this is interesting, and maybe @ef4 knows what's going on (based on this comment),

It seems this peerDependency error exists (@ember/test-waiters could not be resolved) in yarn monorepos, but not pnpm monorepos demonstrated here (embroider scenarios pass in pnpm, but fail in yarn).

My (weak) hypothesis is that this @ember/test-waiters issue may only exist in yarn monorepos -- which... still needs to be solved? because my work monorepo is in yarn -- but maybe this is motivation to migrate to pnpm... but then everyone still using yarn1 is out of luck 🤔

Is this something we want to absorb in embroider? (or do we tell people to move to pnpm (or maybe yarn3?)

@ef4
Copy link

ef4 commented Feb 27, 2022

My (weak) hypothesis is that this @ember/test-waiters issue may only exist in yarn monorepos

Yeah, there's no great mystery here. You can inspect the node_modules structure and see what can resolve what.

When using pnpm, you may also need to enable dependenciesMeta.*.injected to ensure that your own monorepo packages get the strict handling that ensures they will always get the strictly correct peerDependencies.

Also, I don't recommend using "*" ranges for dependencies within your monorepo. Instead, to guarantee that the dependency will come from the within the monorepo use pnpm's workspace protocol.

but then everyone still using yarn1 is out of luck

Yarn 1 is totally unsupported by its maintainers, so that was already true.

Is this something we want to absorb in embroider?

If we care about compatibility with tools like TypeScript, we literally cannot. We could make imports inside our build mean something different than they mean to node, but typescript won't know that and doesn't allow extension of that.

We have enough legacy behavior like that already, I'm not going to add more.

@NullVoxPopuli NullVoxPopuli merged commit c6db46b into NullVoxPopuli:main Feb 27, 2022
@NullVoxPopuli
Copy link
Owner

Thanks for the insights and directions! I'm going to discuss with my team migrating to pnpm (we've been wanting to get off yarn1 anyway).

you may also need to enable dependenciesMeta.*.injected to ensure that your own monorepo packages get the strict handling that ensures they will always get the strictly correct peerDependencies

this is good to know! thanks!
(I also really appreciate how detailed the pnpm docs are)

@patocallaghan patocallaghan deleted the patoc/test-waiters-peer-deps branch February 28, 2022 09:44
@github-actions
Copy link
Contributor

github-actions bot commented Apr 9, 2022

🎉 This PR is included in version 4.5.0 🎉

The release is available on:

Your semantic-release bot 📦🚀

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.

3 participants