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

Refactor edition detection for [emberjs/rfcs#558](https://github.com/emberjs/rfcs/pull/558). #4

Merged
merged 1 commit into from
Dec 11, 2019

Conversation

rwjblue
Copy link
Member

@rwjblue rwjblue commented Dec 11, 2019

Adds support for the system laid out in emberjs/rfc#558, in a backwards compatible way.

Summary of changes:

  • setEdition and clearEdition are "soft" deprecated
  • has now accepts a projectRoot path as a second argument which defaults to the processes current working directory
  • has will check the projectRoot for a package.json, and if it contains ember.edition key that will be returned
  • has continues to fall back to leveraging the preexisting environment variables if package.json was not found or if the package.json does not contain an ember.edition property.

Note: this commit creates a "soft deprecation" so that the ecosystem has a window of time in order to migrate away from setEdition without significant console noise. After a short time period has elapsed with the new mechanism introduced, we will begin issue console warnings for usage of setEdition.

Adds support for the system laid out in Ember RFC #558, in a backwards
compatible way.

Summary of changes:

* `setEdition` and `clearEdition` are "soft" deprecated
* `has` now accepts a `projectRoot` path as a second argument which
  defaults to the processes current working directory
* `has` will check the `projectRoot` for a `package.json`, and if it
  contains `ember.edition` key that will be returned
* `has` continues to fall back to leveraging the preexisting environment
  variables if `package.json` was not found or if the package.json does
  not contain an `ember.edition` property.

Note: this commit creates a "soft deprecation" so that the ecosystem has
a window of time in order to migrate away from `setEdition` without
significant console noise. After a short time period has elapsed with
the new mechanism introduced, we will begin issue console warnings for
usage of `setEdition`.
@rwjblue rwjblue added the enhancement New feature or request label Dec 11, 2019
@rwjblue rwjblue merged commit e67e639 into emberjs:master Dec 11, 2019
@rwjblue rwjblue deleted the refactor-edition-detection branch December 11, 2019 19:18
@rwjblue rwjblue changed the title Refactor edition detection for emberjs/rfcs#558. Refactor edition detection for [emberjs/rfcs#558](https://github.com/emberjs/rfcs/pull/558). Dec 11, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant