Closed villander closed 7 months ago
Hmm, thanks for letting me know @villander! Does flatpickr otherwise work fine for you and is just a testing issue?
Yes, @RobbieTheWagner it's just a testing issue for acceptance tests, for the component tests we're good. I see this repo does not have acceptance tests which made this issue pass through the last release without notice.
Yes, @RobbieTheWagner it's just a testing issue for acceptance tests, for the component tests we're good. I see this repo does not have acceptance tests which made this issue pass through the last release without notice.
Interesting, I am not sure what might be happening. Would you possibly be able to add a basic acceptance test that reproduces the issue?
I've encountered the same problem in one of my apps, will take a look into it soon.
Don't have a lot of time atm, but i least i have a quick fix @villander .
Seems to be related to @ember/test-helpers. We're currently using version 2.7, which is causing issues. Works fine with 3.x.
A temporary fix is to pin "@ember/test-helpers" to version 3.x.
My PNPM overrides:
"pnpm": {
"overrides": {
"@ember/test-helpers": "^3.2.1"
}
},
@AmauryD would updating to 3.x here fix that then? https://github.com/RobbieTheWagner/ember-flatpickr/blob/main/ember-flatpickr/package.json#L45
@AmauryD would updating to 3.x here fix that then? https://github.com/RobbieTheWagner/ember-flatpickr/blob/main/ember-flatpickr/package.json#L45
I tried, but we lose compatibility with Ember 4.4. Actually, this release is unsupported since May 2023. Should we drop the support or do we need to investigate further ?
@RobbieTheWagner this issue wasn't fixed with this latest release. It's failing for "@ember/test-helpers": "3.3.0"
. Could you please reopen it?
https://github.com/RobbieTheWagner/ember-flatpickr/issues/1977#issuecomment-1919959722
cc @AmauryD
Can you provide an example repo or more details ? The problem is fixed using version 7 in my packages
The actual problem seems to be a mismatch between the app and the addon in @ember/test-helpers
versions. If you match exactly the version of the addon (^3.0.0) it should work. What's your @ember/test-helpers
version ?
I suspect the issue is fixed but perhaps you need to run pnpm dedupe @ember/test-helpers
in your monorepo or something @villander. Can you try that?
After dedupe, it made things worse @RobbieTheWagner breaking the build
Build Error (PackagerRunner) in node_modules/.pnpm/ember-animated@2.0.0_@babel+core@7.23.9_@ember+test-helpers@3.3.0_@glint+environment-ember-lo_73frxrh6fy5tz2g552pkrytcqi/node_modules/ember-animated/dist/-private/bounds.js
Module build failed (from ../../../../../../../../Users/villander/Projects/project/web-ui/node_modules/.pnpm/thread-loader@3.0.4_webpack@5.90.3/node_modules/thread-loader/dist/cjs.js):
Thread Loader (Worker 3)
$TMPDIR/embroider/2012c7/node_modules/.pnpm/ember-animated@2.0.0_@babel+core@7.23.9_@ember+test-helpers@3.3.0_@glint+environment-ember-lo_73frxrh6fy5tz2g552pkrytcqi/node_modules/ember-animated/dist/-private/bounds.js/bounds.js: Static class blocks are not enabled. Please add `@babel/plugin-transform-class-static-block` to your configuration.
After dedupe, it made things worse @RobbieTheWagner breaking the build
Build Error (PackagerRunner) in node_modules/.pnpm/ember-animated@2.0.0_@babel+core@7.23.9_@ember+test-helpers@3.3.0_@glint+environment-ember-lo_73frxrh6fy5tz2g552pkrytcqi/node_modules/ember-animated/dist/-private/bounds.js Module build failed (from ../../../../../../../../Users/villander/Projects/project/web-ui/node_modules/.pnpm/thread-loader@3.0.4_webpack@5.90.3/node_modules/thread-loader/dist/cjs.js): Thread Loader (Worker 3) $TMPDIR/embroider/2012c7/node_modules/.pnpm/ember-animated@2.0.0_@babel+core@7.23.9_@ember+test-helpers@3.3.0_@glint+environment-ember-lo_73frxrh6fy5tz2g552pkrytcqi/node_modules/ember-animated/dist/-private/bounds.js/bounds.js: Static class blocks are not enabled. Please add `@babel/plugin-transform-class-static-block` to your configuration.
Looks like an ember-animated issue. I definitely think something with all your dependencies is causing the issue.
When you update from version 4.x to 5.0.0 using Ember.js 5 you'll see a weird issue in the acceptance tests that use
setFlatpickrDate
helper