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

Outdated version of Ember Power Select / Basic Dropdown #205

Open
mkszepp opened this issue Jan 17, 2025 · 13 comments
Open

Outdated version of Ember Power Select / Basic Dropdown #205

mkszepp opened this issue Jan 17, 2025 · 13 comments

Comments

@mkszepp
Copy link

mkszepp commented Jan 17, 2025

Ember Power Select / Ember Basic Dropdown was moved ~ a year ago to an v2 addon (v8.x)

I have seen that the package is still using the legacy version v7.2.0

"ember-power-select": "7.2.0",

The move to v8 would be good, because there were improvement some parts of typing, a11y, dependencies were dropped and also updated.

In addtional you can drop one part of setup for this package (theme config is not needed) and move to recommended way to use it inside application.hbs.

<EuiTitle>
<h3>
Last steps...
</h3>
</EuiTitle>
The whole ember ecosystem is working towards v2 spec, so by now we need to do some extra steps for EuiComboBox to work because its an ember-power-select wrapper.
Inside your index.html file, do the following:
Add a div id="ember-basic-dropdown-wormhole" below body-footer meanwhile ember-power-select and ember-basic-dropdown get modernized, also, add in ember-cli-build, inside the app config
<EuiCodeBlock @language="ts" @isCopyable={{true}}>
{{t "getting_started.ember_power_select"}}

Here you can find the migration docs for this https://ember-power-select.com/docs/migrate-7-0-to-8-0

Changelogs:
https://github.com/cibernox/ember-power-select/blob/master/ember-power-select/CHANGELOG.md

@betocantu93
Copy link
Collaborator

betocantu93 commented Jan 23, 2025

Thanks @mkszepp ! will get on this soon. thanks for reporting.

We just need to be careful because consumers will get this dep bumped too, one time i got bitten because a component got deprecated in ember-power-select and ocnsumers of this addon got bitten by upgrading... even if this addon is not using any newer apis, the final users might

@betocantu93
Copy link
Collaborator

@mkszepp
Copy link
Author

mkszepp commented Jan 26, 2025

I think the update of this dependency is breaking, because the addon is shipping tight now as dependency.

I will recommend to move the dependency to peer so you can make updates in future without making always breaking, when there is a new power select version

@betocantu93
Copy link
Collaborator

Yeah, making it a peer is a good idea!

@betocantu93
Copy link
Collaborator

Ok so I manage to make it work with ember-source 6.2.0, please give it a try on version, all packages on version 12.0.0.

Take a look to /site app if anything...

@betocantu93
Copy link
Collaborator

Seems that bumping power-select, again.. had breaking changes. Renaming helpers, moving apis around... these all should be majors on ember-power-select side.

@mkszepp
Copy link
Author

mkszepp commented Feb 8, 2025

@betocantu93 which helper was renamed in v8?

If you are talking about power-select-is-selected i don't give you right... it was not braking, because the helper was never offical public. It was never documented that it is public, marked inside class as prviate and in additional we did add this to release note after some people have reported that they were using. see
It was more a copy / paste bug when people were overriding components

@betocantu93
Copy link
Collaborator

fixed... ! 12.0.1 now has the latest and works.

@betocantu93
Copy link
Collaborator

Tahnks @mkszepp for reporting and follow-up

@Polve
Copy link

Polve commented Feb 8, 2025

thank you for the updated release!

I tried a new project and I found this issue, I don't reopen the bug because I don't know if it's important or not, but I'll leave it here

WARN  Issues with peer dependencies found
.
└─┬ @ember-eui/core 12.0.1
└─┬ @ember/render-modifiers 2.1.0
└── ✕ unmet peer ember-source@"^3.8 || ^4.0.0 || ^5.0.0": found 6.2.0

@betocantu93
Copy link
Collaborator

betocantu93 commented Feb 8, 2025

Intersting... supposedly render-modifiers has embersource >= 4.0.0

https://github.com/emberjs/ember-render-modifiers/blob/54f3c68c602ddbd5a56f98c7310ce884e30b92c4/package.json#L86

@betocantu93 betocantu93 reopened this Feb 8, 2025
@betocantu93
Copy link
Collaborator

OKay seems the @ember/render-modifiers has pending changes to be released to npm. like a v3 or v2.2.0

in the long run: we should refactor this lib and instead use custom modifiers... this is extremely fragile and risky. Specially without proper testing suite.

@betocantu93
Copy link
Collaborator

A fix to this, if you are using pnpm... is using

pnpm patch @ember/render-modifiers

and patch the peerDependencies, to be >=4.0.0

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants