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

UI: upgrade Ember to 5.4 #26708

Merged
merged 26 commits into from
May 7, 2024
Merged

UI: upgrade Ember to 5.4 #26708

merged 26 commits into from
May 7, 2024

Conversation

hashishaw
Copy link
Contributor

@hashishaw hashishaw commented Apr 30, 2024

This PR updates Ember to 5.4 but keeps EmberData at 4.12. As part of the upgrade, a number of other dependencies (ember-power-select, ember-basic-dropdown, ember-concurrency) also needed to be updated and so there are a number of changes as a result of those upgrades as well.

  • Ent tests pass

Some changes to be aware of:

Ember Concurrency
The format of tasks has changed, and it looks like the @task decorator is no longer preferred. There is also now support for async methods passed into task (rather than generator functions with yield). The upgrade docs are unhelpful, but I'd recommend revisiting their docs to see the most recent patterns.

In addition to the task format, an extra config step is required for concurrency to work within engines.

Ember Power Select
The library updated the test helpers so that some come from ember-power-select/test-support and others come from ember-power-select/test-support/helpers 😒

I added an ariaLabel attribute to our search-select component, as well as fallbacks, so that our usage of the component is as compliant as possible. Please be aware that the component requires one of ariaLabel, label, or id moving forward.

Deprecations
The following is an incomplete list of PR's that handled deprecated features being removed in Ember 5:

@hashishaw hashishaw added the ui label Apr 30, 2024
@hashishaw hashishaw added this to the 1.17.0-rc milestone Apr 30, 2024
@github-actions github-actions bot added the hashicorp-contributed-pr If the PR is HashiCorp (i.e. not-community) contributed label Apr 30, 2024
Copy link

github-actions bot commented Apr 30, 2024

CI Results:
All Go tests succeeded! ✅

@hashishaw hashishaw mentioned this pull request May 3, 2024
1 task
@@ -68,6 +68,9 @@ module.exports = {
// test files
files: ['tests/**/*-test.{js,ts}'],
extends: ['plugin:qunit/recommended'],
rules: {
'qunit/require-expect': 'off',
Copy link
Contributor Author

Choose a reason for hiding this comment

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

this rule would have made us remove assert.expect in places where it really does help ensure that certain assertions get called (eg in mirage server requests). So I've turned it off and we can revisit in the future if we want to update our tests and turn it on. https://github.com/platinumazure/eslint-plugin-qunit/blob/main/docs/rules/require-expect.md

@@ -10,7 +10,7 @@ export function initialize() {
registerDeprecationHandler((message, options, next) => {
// filter deprecations that are scheduled to be removed in a specific version
// when upgrading or addressing deprecation warnings be sure to update this or remove if not needed
if (options?.until.includes('5.0')) {
if (options?.until.includes('5.0') && options?.for === 'ember-data') {
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Now that we're on Ember 5, we only want to turn of EmberData 5 deprecations

@hashishaw hashishaw marked this pull request as ready for review May 6, 2024 21:54
@hashishaw hashishaw requested a review from a team as a code owner May 6, 2024 21:54
Copy link

github-actions bot commented May 6, 2024

Build Results:
All builds succeeded! ✅

Copy link
Contributor

@Monkeychip Monkeychip left a comment

Choose a reason for hiding this comment

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

Great work. Nice to see so many other packages get bumped in the process. Let the testing begin!

@hashishaw hashishaw merged commit c02787c into main May 7, 2024
31 checks passed
@hashishaw hashishaw deleted the ui/VAULT-26131/upgrade-ember-to-5.4 branch May 7, 2024 16:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
hashicorp-contributed-pr If the PR is HashiCorp (i.e. not-community) contributed ui
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants