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

Enforce usage of capabilities generation. #19173

Merged
merged 1 commit into from
Sep 30, 2020
Merged

Commits on Sep 30, 2020

  1. Enforce usage of capabilities generation.

    Prior to this change it was possible to avoid using a given type's
    `capabilities` builder function (intentionally or on accident) by doing
    something like:
    
    ```js
    class MyManager {
      capabilities = {
        // magical properties from Ember's internals
      }
    }
    ```
    
    The API's that we _intended_ folks to be using is something like:
    
    ```js
    import { capabilties as modifierCapabilities } from '@ember/modifier';
    
    class MyManager {
      capabilities = modifierCapabilities('3.22');
    }
    ```
    
    This commit ensures that Ember's own internal structures can not be
    "spoofed" (avoiding our constraints, or creating a frankenstein
    manager).
    rwjblue committed Sep 30, 2020
    Configuration menu
    Copy the full SHA
    f776ac8 View commit details
    Browse the repository at this point in the history