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

Move private modules into the -private directory #3986

Merged
merged 1 commit into from
Dec 11, 2015

Conversation

bmac
Copy link
Member

@bmac bmac commented Dec 11, 2015

to discourage importing from paths that may change in future versions

cc @fivetanley @stefanpenner @rwjblue

This pr moves everything but index.js into the -private directory. We can make individual prs to move stable modules out of private directory when we decide they are stable.

to discourage importing from paths that may change in future versions
@rwjblue
Copy link
Member

rwjblue commented Dec 11, 2015

👍

@@ -3,18 +3,18 @@
*/

import Ember from 'ember';
import Adapter from "ember-data/system/adapter";
import Adapter from "ember-data/-private/system/adapter";
Copy link
Member

Choose a reason for hiding this comment

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

RESTAdapter is public API though right?

Copy link
Member Author

Choose a reason for hiding this comment

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

Right now in Ember Data 2.2.0 the public api to access any Ember Data module is:

import DS from 'ember-data';

// then do something with `DS.RESTAdapter`

Instead of trying to make a judgement call about what we should allow users to import and what we should keep hidden I decided to move everything into the -private module path. After this is merged we can open new prs to move things like the RESTAdapter to a public path. That way we can be more deliberate and discerning about what gets exposed publicly.

Copy link
Member

Choose a reason for hiding this comment

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

Another way of putting this: to date Ember Data's public API has been strictly the globals output (which seems unchanged by this PR). This PR helps ensure that we are not inadvertently making many more of our internals "public" because the modules are importable and not marked as private.

fivetanley added a commit that referenced this pull request Dec 11, 2015
Move private modules into the `-private` directory
@fivetanley fivetanley merged commit 209326f into emberjs:master Dec 11, 2015
@bmac bmac deleted the private-modules branch December 11, 2015 21:19
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.

3 participants