Skip to content

Conversation

NullVoxPopuli
Copy link
Contributor

@NullVoxPopuli NullVoxPopuli commented Oct 25, 2020

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

@LevelbossMike
Copy link
Owner

LevelbossMike commented Oct 26, 2020

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?

@NullVoxPopuli
Copy link
Contributor Author

Yes. Also, hopefully there will be a polyfill for @ember/helper and friends used by the new usable wip work

@LevelbossMike LevelbossMike marked this pull request as draft October 26, 2020 15:07
@LevelbossMike
Copy link
Owner

ok marked as a draft @NullVoxPopuli - thanks for the heads up on the change 👍

@NullVoxPopuli
Copy link
Contributor Author

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

@LevelbossMike
Copy link
Owner

@NullVoxPopuli would be surprising if you were stuck. ember-usable was working before the helper-manager stuff that the new version depends on?! Could you confirm this?

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?

@NullVoxPopuli
Copy link
Contributor Author

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

guards: {},
});
*/
export class Statechart<
Copy link
Contributor Author

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);
  }
}

@NullVoxPopuli NullVoxPopuli force-pushed the update-usable-polyfill branch 2 times, most recently from 8670bb3 to 429ba90 Compare December 18, 2020 19:41
@@ -1,199 +0,0 @@
import {
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 file is not needed, it may have been committed by accident?

@NullVoxPopuli
Copy link
Contributor Author

For reviewing purposes, most of the irrelevant changes are in the first commit - dependency and lockfile changes

Copy link
Owner

@LevelbossMike LevelbossMike left a 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.

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

Successfully merging this pull request may close these issues.

2 participants