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

prefix private methods with underscore - store.js #3250

Closed
26 tasks
fivetanley opened this issue Jun 8, 2015 · 7 comments
Closed
26 tasks

prefix private methods with underscore - store.js #3250

fivetanley opened this issue Jun 8, 2015 · 7 comments

Comments

@fivetanley
Copy link
Member

Steps to fixing this issue:

  1. deprecate the method. You can use Ember.deprecate('serialize was documented as private and will be removed in the next version of Ember Data.')
  2. move the method to an underscored method (for example _serialize) and update usages in the codebase

If the item is labeled in parenthesis as (public), the @private yuidoc tag should be removed. Otherwise, if it is private, take the steps above to deprecate and rename the method.

  • packages/ember-data/lib/system/store.js
    • init (private, but not sure how to document)
    • serialize (private)
    • findById (public)
    • findByIds (public? ask @igorT)
    • fetchRecord (private)
    • reloadRecord (private)
    • recordForId (deprecate?? ask @bmac)
    • findMany (private)
    • findHasMany (private)
    • findBelongsTo (private)
    • findAll (public)
    • didUpdateAll (private)
    • dataWasUpdated (private)
    • scheduleSave (private)
    • flushPendingSave (private)
    • didSaveRecord (private)
    • recordWasInvalid (private)
    • recordWasError (private)
    • updateId (private)
    • typeMapFor (private)
    • buildRecord (private)
    • dematerializeRecord (should be public, but is deprecated)
    • adapterFor (should be public - fivetanley)
    • serializerFor (should be public - fivetanley)
    • retrieveManagedInstance (should be private - fivetanley)
@gevious
Copy link

gevious commented Jun 8, 2015

I'm going to give this one a go. PR will follow soon

@gevious
Copy link

gevious commented Jun 8, 2015

buildRecord is actually named buildInternalModel. I've changed the yuidoc.

I've sent PR #3254

@runspired
Copy link
Contributor

recordForId is pretty heavily relied on by most hacks I've seen trying to get around ED edge cases. You can deprecate it because peekRecord is a direct substitute, but you'll likely need to keep hasRecordForId which I don't see mentioned here.

@dan-ste
Copy link

dan-ste commented Sep 21, 2016

Anybody working on it?

@pete-the-pete
Copy link
Contributor

Is this still open? @bmac commented on @gevious's PR saying we missed the window since 2.0 was released (3254#issuecomment-147510113)

@yogipatel
Copy link

Does this still need work?

@stefanpenner
Copy link
Member

This seems to have gone stale

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

No branches or pull requests

7 participants