ember-auto-import icon indicating copy to clipboard operation
ember-auto-import copied to clipboard

Duplicate dependency problem during dependency transition of v1 to v2 addon

Open NullVoxPopuli opened this issue 1 year ago • 4 comments

When upgrading a special-ember-addon from a v1 addon to v2 addon upgrade (and both existing in the same project) -- there is an issue, an error: "test waiters can't be found"

if both loaded at the same time, test-waiters should still work appropriately, due to all the settled state info living on globalThis

Repro: https://github.com/NullVoxPopuli/repro-vX-v2-vY-v1-addon-coexistence

Also repro:

  • create new ember project (does not include test-waiters)
  • add test-waiters (v4)
  • start app, visit /tests

I suspect this is the same issue with @ember/string?

The situation (rn)

  • @ember/test-helpers -> @ember/test-waiters@v3
  • app -> @ember/test-waiters@v4

A possible work-around (requires a bit of luck (no v1 addens without auto-import)) if folks need it is to set an overrides for @ember/test-waiters. This would also make your install times a bit faster in case you accidentally had many copies. (tho note v4 is a breaking change, so check the changelog in test-waiters)

NullVoxPopuli avatar Dec 06 '24 00:12 NullVoxPopuli

Problem does not exist under vite: https://github.com/NullVoxPopuli/repro-vX-v2-vY-v1-addon-coexistence/tree/vite

NullVoxPopuli avatar Dec 06 '24 17:12 NullVoxPopuli

Problem does not exist under embroidedr-3-webpack-4: https://github.com/NullVoxPopuli/repro-vX-v2-vY-v1-addon-coexistence/tree/embroider-3-webpack-4

NullVoxPopuli avatar Dec 06 '24 17:12 NullVoxPopuli

Was this fixed in https://github.com/embroider-build/ember-auto-import/pull/667 ?

mansona avatar Nov 07 '25 11:11 mansona

I haven't checked 🙈

NullVoxPopuli avatar Nov 07 '25 13:11 NullVoxPopuli