ember-cli / ember-resolver

MIT License
87 stars 104 forks source link

Do not use global ember -- drop support for ember-source < 4.12 #973

Closed NullVoxPopuli closed 5 months ago

NullVoxPopuli commented 5 months ago

For https://github.com/emberjs/rfcs/pull/1015

If folks come across this PR and are using Ember.Templates, use register instead.

NullVoxPopuli commented 5 months ago

CI is green, but ember-lts-4.4 is a required check, but this PR drops support for 4.4

mkszepp commented 5 months ago

@NullVoxPopuli I think there was forget to update the peerDependency to 4.12.0 or?

https://github.com/ember-cli/ember-resolver/blob/5b5775c2ec98e5a89ff98a168bcfc2b3c80a28ae/addon/package.json#L29

Is there any reason to ship still ember-cli-babel v7 as dependency? Why not v8? If i remember on discored you want to force peoples to update/ using override

https://github.com/ember-cli/ember-resolver/blob/5b5775c2ec98e5a89ff98a168bcfc2b3c80a28ae/addon/package.json#L26

NullVoxPopuli commented 5 months ago

I think there was forget to update the peerDependency to 4.12.0 or?

Yup, deserves its own PR tho

v7 as dependency?

Yeah, updating this just wasn't a focus from yesterday, but it probably should happen!

ijlee2 commented 4 months ago

Hi, @NullVoxPopuli and @ef4.

I think you'll want to communicate the breaking change better in the release notes for v12 (provide a migration guide). Initially, I had thought the PR would affect only standalone apps.

When ember-resolver@12 is installed in an addon project with a test app(s) that uses ember-try, the 4.4 and 4.8 scenarios will fail and may surprise maintainers. You can see this happen in two separate projects:

Here's what to do to make CI pass again.

NullVoxPopuli commented 4 months ago

@ember/owner isn't available pre 4.11.

I can copy notes for folks to copy-pasta if folks want to keep testing against older ember. This should be a common occurance though -- especially as you go back further in time. ... so much so that I eventually gave up on adding stuff to ember-try, and made a min-supported separate test app for 3.x, which doesn't use ember-try at all https://github.com/universal-ember/reactiveweb/tree/main/tests -- the delta in package.json needs gets too great over time.

All this to say, I updated the release notes: https://github.com/ember-cli/ember-resolver/releases/tag/v12.0.0

ef4 commented 4 months ago

I would add that you can use ember-try to downgrade ember-resolver in the older scenarios. The same way ember-try is adjusting the ember-source version downward it can adjust ember-resolver downward. This actually improves the realism of the tests because you'd be testing under the conditions that apps on older ember-source versions are more likely to really be using.