1) About the new module syntax: there are a couple of things that we use and don't seem to have been migrated:
Ember.HTMLBars.compile
Ember.Logger.{debug,warn,error}
Ember.onerror
Am I missing something or these are things that I have to be using the old way for now?
2) In the release notes it is mentioned that ember-cli-shims could be removed. But now I'm getting a warning: WARNING: You have not included ``ember-cli-shims`` in your project's ``bower.json`` or ``package.json``. This only works if you provide an alternative yourself and unset ``app.vendorFiles['app-shims.js']``.
Is this normal?
Hi @boris-petrov, thanks for the feedback.
Yes, we are still figuring out some of the mappings. We thought it would be better to use the Ember namespace for now instead of solidifying a public API that we would have to deprecate and maintain if we rushed and missed the mark.
Use the old way for now! About Ember.Logger specifically, consider using console.* instead. I believe it's only IE9 that doesn't support the whole console API.
Could you post your package.json?
@locks - thanks for the answer!
About using the old way - are you talking about ALL the APIs or just these couple that I mentioned? As I already ported our application to use the new ones. :D
About package.json:
{
"name": "frontend",
"version": "0.0.0",
"private": true,
"description": "Small description for frontend goes here",
"author": "",
"directories": {
"doc": "doc",
"test": "tests"
},
"repository": "",
"scripts": {
"build": "ember build",
"start": "ember server",
"test": "ember test"
},
"devDependencies": {
"bower": "1.8.2",
"broccoli-asset-rev": "2.6.0",
"broccoli-funnel": "2.0.1",
"broccoli-merge-trees": "2.0.0",
"coffeelint": "2.0.6",
"ember-ajax": "3.0.0",
"ember-array-helper": "3.0.0",
"ember-browserify": "1.2.0",
"ember-cli": "2.16.0",
"ember-cli-babel": "6.8.2",
"ember-cli-bootstrap-sassy": "0.5.6",
"ember-cli-coffeescript": "profuz/ember-cli-coffeescript#e6531a46b801aaf93c5f2875584bb11ef45efa86",
"ember-cli-content-security-policy": "1.0.0",
"ember-cli-dependency-checker": "2.0.1",
"ember-cli-eslint": "4.2.1",
"ember-cli-gzip": "1.1.3",
"ember-cli-htmlbars": "2.0.3",
"ember-cli-htmlbars-inline-precompile": "1.0.2",
"ember-cli-inject-live-reload": "1.7.0",
"ember-cli-moment-shim": "3.5.0",
"ember-cli-qunit": "4.0.1",
"ember-cli-sass": "7.0.0",
"ember-cli-shims": "1.1.0",
"ember-cli-stylelint": "0.15.0",
"ember-cli-template-lint": "0.7.5",
"ember-cli-test-loader": "2.2.0",
"ember-cli-uglify": "2.0.0",
"ember-cli-webfont": "0.0.4",
"ember-cli-yaml-module": "0.1.0",
"ember-drag-drop": "0.4.6",
"ember-fuelux-sass": "github:profuz/ember-fuelux-sass#a9e927b9ca10d61a995c63c566f4ea78d9a22dcf",
"ember-fullcalendar": "1.7.0",
"ember-load-initializers": "1.0.0",
"ember-page-title": "3.2.2",
"ember-resolver": "4.5.0",
"ember-sinon": "1.0.1",
"ember-storage": "1.1.2",
"ember-template-lint": "0.8.8",
"ember-truth-helpers": "1.3.0",
"ember-wormhole": "0.5.2",
"loader.js": "4.6.0",
"moment": "2.18.1",
"moment-timezone": "0.5.13",
"quill": "1.3.3",
"video.js": "6.2.7",
"videojs-contrib-dash": "2.9.1",
"videojs-hotkeys": "0.2.20",
"videojs-offset": "2.0.0-beta.1"
},
"engines": {
"node": "^4.5 || 6.* || >= 7.*"
}
}
Is this: import Ember from 'ember' coming from ember-cli-shims? I.e., all the plugins that still do the "old" way are going to need that package?
About using the old way - are you talking about ALL the APIs or just these couple that I mentioned?
Just the ones you mentioned! In short, use ember-modules-codemod or the eslint plugin and don't worry about it ;)
You cannot remove ember-cli-shims if you still have addons in your project that use ember-cli-babel < 6.6.0, the warning that you are receiving now is something we are working on removing (after checking that all addons in the project have new enough ember-cli-babel versions).
@locks - yes, I know about ember-modules-codemod, it's just that we use CoffeeScript and the tool doesn't work for it so I had to do some Vim magic to convert everything by hand. :)
@rwjblue - thanks for the info!
Thank you both for the answers and the support! Feel free to close the issue! I'll leave it open if you decide to leave it as a reference for the missing modules for HTMLBars, Logger and onerror.
I'll close it because we are already tracking missing imports at https://github.com/ember-cli/ember-rfc176-data/issues/12. Thank you for your feedback, and good luck with the modules!
Most helpful comment
You cannot remove ember-cli-shims if you still have addons in your project that use ember-cli-babel < 6.6.0, the warning that you are receiving now is something we are working on removing (after checking that all addons in the project have new enough ember-cli-babel versions).