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

Fix warnings when the legacy module deprecation is triggered #272

Merged
merged 1 commit into from
Jun 14, 2021

Conversation

sandydoo
Copy link
Contributor

DEPRECATION: When calling `deprecate` you must provide `for` in options. Missing options.for in \"ember-test-waiters-legacy-module-name\" deprecation [deprecation id: ember-source.deprecation-without-for]

DEPRECATION: When calling `deprecate` you must provide `since` in options. Missing options.since in \"ember-test-waiters-legacy-module-name\" deprecation [deprecation id: ember-source.deprecation-without-since]

This adds the required for and since options when creating the deprecation warning.

This adds the required `for` and `since` options when creating a
deprecation warning.
Copy link
Member

@rwjblue rwjblue left a comment

Choose a reason for hiding this comment

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

Thanks @sandydoo!

@rwjblue rwjblue merged commit 8348274 into emberjs:master Jun 14, 2021
@rwjblue rwjblue added bug Something isn't working and removed internal labels Jun 14, 2021
@kellyselden
Copy link
Member

Could we get a release of this please?

@scalvert
Copy link
Collaborator

scalvert commented Jul 6, 2021

I didn't notice this until running the tests myself, but this fix causes a build error due to the types being mismatched.

addon/ember-test-waiters/index.ts:9:5 - error TS2345: Argument of type '{ id: string; until: string; for: string; since: string; }' is not assignable to parameter of type '{ id: string; until: string; url?: string | undefined; }'.
  Object literal may only specify known properties, and 'for' does not exist in type '{ id: string; until: string; url?: string | undefined; }'.

9     for: 'ember-test-waiters',
      ~~~~~~~~~~~~~~~~~~~~~~~~~

Specifically, it looks as though @types/ember__debug is out of date, and the type definitions for the deprecate function aren't inline with the API updates that require the for property.

https://github.com/DefinitelyTyped/DefinitelyTyped/blob/master/types/ember__debug/index.d.ts#L71

I can fix this in this repo, but we'll need to wait for that fix before we can release.

@sandydoo
Copy link
Contributor Author

sandydoo commented Jul 6, 2021

@scalvert, shoot, sorry for letting that slip through 😞

Linking relevant PR: DefinitelyTyped/DefinitelyTyped#52397

@scalvert
Copy link
Collaborator

No worries, @sandydoo! Easy mistake to make, especially considering we didn't have any type checking during CI. I'm adding this not to hopefully avoid this situation in the future.

See #279

@scalvert
Copy link
Collaborator

I'll try to get this fixed up and released today.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants