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

Upgrade to Ember 5 and convert to a v2 addon #470

Merged
merged 17 commits into from
May 15, 2024

Conversation

wozny1989
Copy link
Contributor

@wozny1989 wozny1989 commented Jun 3, 2023

Tasks

  • Update all packages and Ember to version 5.8, support for >= 3.28
  • Migrate to addon v2
  • Fix error with content or passed custom params:
Uncaught Error: Assertion Failed: You attempted to update `perPageParam` on `<InfinityModel:ember129>`, but it had already been used previously in the same computation.  Attempting to update a value after using it in a computation can cause logical errors, infinite revalidation bugs, and performance issues, and is not supported.

@ndekeister-us
Copy link

ndekeister-us commented Nov 4, 2023

Ping @snewcomer any chance we can have checks running for this PR? (and if they are passing, to have this PR merged)

Ember 5 is coming and we will need some changes in this project, I believe this PR is a good start (and in fact may be enough to have the compatibility with Ember 5)

@jahrock
Copy link
Contributor

jahrock commented Dec 14, 2023

Hi @snewcomer & @hhff
We would be very grateful if you could take the time to look at the PR.

@hhff
Copy link
Collaborator

hhff commented Mar 28, 2024

Hi @jahrock - it's been a long time since I worked on Ember. @snewcomer - what do you think?

@jahrock
Copy link
Contributor

jahrock commented Apr 2, 2024

Hi @hhff
Thanks for your feedback.
Would it be an option for you to transfer the addon ownership to "adopted ember addons" so that interested developers can get involved?

The effort is quite low and can be achieved through the linked process.
https://github.com/adopted-ember-addons/program-guidelines/blob/master/README.md

@hhff
Copy link
Collaborator

hhff commented Apr 2, 2024 via email

@jahrock
Copy link
Contributor

jahrock commented Apr 10, 2024

Hi @hhff
You can transfer the github repository to @RobbieTheWagner. Keep in mind to provide him access to npm.js as well.

@RobbieTheWagner
Copy link
Member

Hi @hhff You can transfer the github repository to @RobbieTheWagner. Keep in mind to provide him access to npm.js as well.

I am rwwagner90 on npm

@jahrock
Copy link
Contributor

jahrock commented Apr 11, 2024

Hi @wozny1989
It seems that the ember-infinity blueprint component has not been refactored yet.
blueprints/infinity-template/files/app/templates/components/infinity-loader.hbs

@wozny1989
Copy link
Contributor Author

Hi @wozny1989 It seems that the ember-infinity blueprint component has not been refactored yet. blueprints/infinity-template/files/app/templates/components/infinity-loader.hbs

@jahrock done 👍

@RobbieTheWagner
Copy link
Member

Looks like we need to update the node version used to allow these tests to run

@wozny1989
Copy link
Contributor Author

Looks like we need to update the node version used to allow these tests to run

@RobbieTheWagner I just updated it, let's check

@RobbieTheWagner
Copy link
Member

@wozny1989 shouldn't we also update the ember-try scenarios to include 4.x versions, and beta and canary and such? I think we should ember-cli-update and do whatever the blueprints do there probably.

@wozny1989
Copy link
Contributor Author

@RobbieTheWagner Now it should be fine, tested locally as well:
image

Copy link
Contributor

@jahrock jahrock Apr 16, 2024

Choose a reason for hiding this comment

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

Hi @wozny1989
I did not expect that package-lock.json and yarn.lock to be present.
Is this on purpose?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@jahrock My bad, just removed package-lock.json 👍

@RobbieTheWagner
Copy link
Member

@wozny1989 it looks like we need to update node versions. Can you update engines in package.json and our ci.yml to enforce node 18+ please?

@wozny1989
Copy link
Contributor Author

@wozny1989 it looks like we need to update node versions. Can you update engines in package.json and our ci.yml to enforce node 18+ please?

@RobbieTheWagner Done 👍

@@ -1,9 +1,9 @@
/*eslint-env node*/
Copy link
Member

Choose a reason for hiding this comment

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

I think this file should be deleted, as the root .eslintrc.js handles configuring the test file linting now

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Right, I just deleted it

@wozny1989
Copy link
Contributor Author

wozny1989 commented Apr 25, 2024

@RobbieTheWagner Also I bumped @embroider/test-setup, locally embroider setup are passing 🤔 let's check on CI now

@wozny1989
Copy link
Contributor Author

On my fork CI have different output, but why? wozny1989#1

@wozny1989
Copy link
Contributor Author

@RobbieTheWagner Finally I migrated addon to more embroider friendly addon v2, please re-run CI and let's keep finger crossed 🤞 fyi @jahrock

@RobbieTheWagner
Copy link
Member

A v2 addon is definitely what we want for the future, but this is quite a lot to review now 😅

@jahrock
Copy link
Contributor

jahrock commented Apr 28, 2024

As I see, many addons get ported from npm to pnpm. Would it make sense to give it a try?

@wozny1989
Copy link
Contributor Author

A v2 addon is definitely what we want for the future, but this is quite a lot to review now 😅

@RobbieTheWagner Sorry for that! I had no other idea how to fix the tests on Embroider 😅

As I see, many addons get ported from npm to pnpm. Would it make sense to give it a try?

@jahrock I just migrated to pnpm, please review when you have time 🙈

@wozny1989
Copy link
Contributor Author

Finally I bumped to Ember 5, now we have support for Ember >= 3.28.x

@wozny1989 wozny1989 changed the title Upgrade to Ember 4 Upgrade to Ember 5 May 6, 2024
Copy link
Contributor

@jahrock jahrock left a comment

Choose a reason for hiding this comment

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

Works as expected within my ember 4.12 app.
There are no further suggestions from my side.

run: echo "::set-output name=dir::$(yarn cache dir)"
try-scenario:
- ember-lts-3.24
- ember-lts-3.28
Copy link
Contributor

Choose a reason for hiding this comment

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

Hi @wozny1989
As suggested by @RobbieTheWagner we should test all 4.x LTS versions to ensure complatibility.

Suggested change
- ember-lts-3.28
- ember-lts-3.28
- ember-lts-4.4
- ember-lts-4.8
- ember-lts-4.12

Copy link
Contributor

Choose a reason for hiding this comment

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

Hi @wozny1989
Let's add the 4.+ LTS versions here as well, so we can verify locally that all versions work as expected.

@wozny1989
Copy link
Contributor Author

@jahrock Thanks for review, just added scenarios for LTS 4.12 and 5.8 👍

- ember-lts-5.4
- ember-lts-5.8
Copy link
Contributor

Choose a reason for hiding this comment

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

I noticed that 5.8 was just released and it's current state is LTS candidate, until 5.9 get released.
Ember released 5.8

IMHO it should be ok to add the next LTS version in advance.

@jahrock
Copy link
Contributor

jahrock commented May 10, 2024

Hi @RobbieTheWagner
what do you think, are we ready to merge?

@mansona
Copy link
Contributor

mansona commented May 15, 2024

I've noticed a few issues with this but I'll fix it after merging since it's such a large PR to review 🙈

@mansona mansona merged commit 2493549 into adopted-ember-addons:master May 15, 2024
14 checks passed
@mansona mansona changed the title Upgrade to Ember 5 Upgrade to Ember 5 and convert to a v2 addon May 15, 2024
This was referenced May 16, 2024
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.

None yet

7 participants