Convert packages/ember to TS#20175
Merged
chriskrycho merged 2 commits intoemberjs:masterfrom Oct 28, 2022
Merged
Conversation
Contributor
|
When I look to repro locally, I don't even get as far as the failures which show up in CI; it fails on $ env TEST_SUITE=package PACKAGE="@ember/debug" yarn test |
chriskrycho
reviewed
Sep 27, 2022
742b09f to
22c62d4
Compare
chriskrycho
added a commit
that referenced
this pull request
Oct 26, 2022
This isn't remotely ready for primetime, but it does prove out the basic viability of @chadhietala's suggestion that we may not need to fix all the circularities before we can publish. We in fact The things we will need to do to be able to execute the rest of the way on this, given our goals: - Fix a couple cases where we are using private names in public types, specifically around the `OWNER` from `@glimmer/owner`. - Put the hacky `generate-tsconfigs.mjs` script somewhere besides the root, expand its capabilities to include wrapping generated modules in a `declare module` statement and running Prettier on the result, and rename it accordingly. - Land @wagenet's in-progress PR (#20175) to convert the `ember` package to TS so we can publish types for it, which will unblock some of the other Ember packages as well. - Properly exclude the parts of Ember's APIs we *don't* want to be publishing (all the purely-internal and private stuff).
3 tasks
chriskrycho
added a commit
that referenced
this pull request
Oct 26, 2022
This isn't remotely ready for primetime, but it does prove out the basic viability of @chadhietala's suggestion that we may not need to fix all the circularities before we can publish. We in fact can just publish as is: none of the circularities are *hard* blockers, at least for *this* part of the effort (though they will be for getting docs published with these as the source of truth). The things we will need to do to be able to execute the rest of the way on this, given our goals: - Fix a couple cases where we are using private names in public types, specifically around the `OWNER` from `@glimmer/owner`. - Put the hacky `generate-tsconfigs.mjs` script somewhere besides the root, expand its capabilities to include wrapping generated modules in a `declare module` statement and running Prettier on the result, and rename it accordingly. - Land @wagenet's in-progress PR (#20175) to convert the `ember` package to TS so we can publish types for it, which will unblock some of the other Ember packages as well. - Properly exclude the parts of Ember's APIs we *don't* want to be publishing (all the purely-internal and private stuff).
chriskrycho
added a commit
that referenced
this pull request
Oct 26, 2022
This isn't remotely ready for primetime, but it does prove out the basic viability of @chadhietala's suggestion that we may not need to fix all the circularities before we can publish. We in fact can just publish as is: none of the circularities are *hard* blockers, at least for *this* part of the effort (though they will be for getting docs published with these as the source of truth). The things we will need to do to be able to execute the rest of the way on this, given our goals: - Fix a couple cases where we are using private names in public types, specifically around the `OWNER` from `@glimmer/owner`. - Put the hacky `generate-tsconfigs.mjs` script somewhere besides the root, expand its capabilities to include wrapping generated modules in a `declare module` statement and running Prettier on the result, and rename it accordingly. - Land @wagenet's in-progress PR (#20175) to convert the `ember` package to TS so we can publish types for it, which will unblock some of the other Ember packages as well. - Properly exclude the parts of Ember's APIs we *don't* want to be publishing (all the purely-internal and private stuff).
22c62d4 to
8bddebe
Compare
While we might be able to make the change over to using native getters and setters in a future PR, we want this change to be exactly and only a type conversion, exactly preserving the previous behavior. Switching back to using `Object.defineProperty()` for the getters and setters defined on the `Ember` namespace preserves the previous behavior, which our tests correctly caught for us!
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.