Upgrade to Pro — share decks privately, control downloads, hide ads and more …

Getting started with ember-cli-deprecation-workflow

Getting started with ember-cli-deprecation-workflow

Robert DeLuca

August 27, 2015
Tweet

More Decks by Robert DeLuca

Other Decks in Programming

Transcript

  1. ember-cli-deprecation-workflow
    @robdel12
    1

    View Slide

  2. Who has seen this before?
    2

    View Slide

  3. 3

    View Slide

  4. The deprecation warnings
    can be overwhelming.
    4

    View Slide

  5. But that’s okay.
    5

    View Slide

  6. ember-cli-deprecation-
    workflow to the rescue!
    6

    View Slide

  7. Let’s get set up.
    7

    View Slide

  8. Run `ember install ember-cli-
    deprecation-workflow` in your
    ember cli project.
    8

    View Slide

  9. Create the config file:
    `config/deprecation-workflow.js`
    9

    View Slide

  10. Run your test suite with the server:
    `ember test - - server`
    10

    View Slide

  11. After the tests finish run
    `deprecationWorkflow.flushDeprecations() ` in the
    browser console.
    11

    View Slide

  12. Paste the output into your
    deprecation-workflow config file you
    created.
    12

    View Slide

  13. 13

    View Slide

  14. Why is this awesome?
    14

    View Slide

  15. Change one object from
    “silence” to “throw”.
    15

    View Slide

  16. 16

    View Slide

  17. This will raise an
    exception when a
    deprecation is thrown.
    17

    View Slide

  18. And give a stack trace.
    18

    View Slide

  19. Click that link to see the offending code.
    19

    View Slide

  20. 20

    View Slide

  21. You can break each deprecation
    into a commit.
    21

    View Slide

  22. It allows you to focus on one
    problem at a time.
    22

    View Slide

  23. Lather, rinse, repeat.
    23

    View Slide

  24. Limitations
    • Doesn’t work with deprecations in vendor.js1
    • Only catches deprecations ran in the browser2
    24

    View Slide

  25. Go forth and upgrade!
    25

    View Slide

  26. Wifi name: spiceworksguest
    Password: R2d2C3p0

    View Slide