-
Notifications
You must be signed in to change notification settings - Fork 13
switch from ember-usable to ember-could-get-used-to-this #317
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
base: master
Are you sure you want to change the base?
switch from ember-usable to ember-could-get-used-to-this #317
Conversation
The entire spike by @pzuraq seems pretty much work in progress. Is this tied to beta features of Ember 3.22+? Does it make sense to mark this PR as a draft if this is the case? |
Yes. Also, hopefully there will be a polyfill for |
ok marked as a draft @NullVoxPopuli - thanks for the heads up on the change 👍 |
unconfirmed, but it seems I'm maybe stuck on Ember 3.21.x until this is out? ember-usable seems to be showing some age. 🤔 I'll try to get this finished up this week |
@NullVoxPopuli would be surprising if you were stuck. If this was an actual issue with ember-usable I think the solution would be more complicated because versions > 3.22 would need to work differently. Unless the helper changes are polyfillable? |
Here are the errors I get with latest ember: https://github.com/NullVoxPopuli/emberclear/pull/1284/checks?check_run_id=1527736502 I assumed it was related to the polyfill because all the failing tests have a statechart involved |
addon/usables/use-machine.ts
Outdated
guards: {}, | ||
}); | ||
*/ | ||
export class Statechart< |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
over in emberclear, I'm using these types:
type LazyTrackedArgs = {
positional?: Array<unknown>;
named?: Record<string, unknown>;
}
declare module 'ember-could-get-used-to-this' {
export const use: PropertyDecorator;
export class Resource<Args extends LazyTrackedArgs> {
protected args: Args;
// This is a lie, but makes the call site nice
constructor(fn: () => Args['positional'] | Args);
}
}
6b85b98
to
0b4cde6
Compare
8670bb3
to
429ba90
Compare
@@ -1,199 +0,0 @@ | |||
import { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this file is not needed, it may have been committed by accident?
For reviewing purposes, most of the irrelevant changes are in the first commit - dependency and lockfile changes |
429ba90
to
8ade867
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for looking into this - I will have to time to look this through more thoroughly over the holidays.
This reverts commit af1ea61.
implementation: https://github.com/pzuraq/ember-could-get-used-to-this/pull/10/files
NOTE: this'll be a breaking change for ember-statecharts and, at the time of writing, requires ember-source@beta