-
-
Notifications
You must be signed in to change notification settings - Fork 10
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
Add input transform support #35
Conversation
Right now the tests are not working. They are not able to capture the deprecations that are being thrown. |
index.js
Outdated
@@ -1,12 +1,14 @@ | |||
/* eslint-env node */ | |||
'use strict'; | |||
|
|||
const transform = require('./addon/transforms/input'); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Seems vaguely odd to require from addon
while in node-land. Totally may work fine though. It just surprised me 😝
index.js
Outdated
module.exports = { | ||
name: 'ember-2-legacy', | ||
|
||
included() { | ||
this._super.included.apply(this, arguments); | ||
|
||
this.import('vendor/ember/ember-template-compiler.js'); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@rwjblue Is there a better way to do this only for the addons tests? or should I just include it in tests/index.html directly?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hmm, why do you need it?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think the thing you will need to do is modify the tests to import hbs from 'htmlbars-inline-precompile'
. If you do that, you will see the deprecations on the console at build time but you cannot do assert.expectDeprecation
. In other words, you can only confirm that the old functionality works, but not that it deprecates. IMHO, thats a fine trade off, what do you think?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm fine with not testing the deprecations as that was the only thing keeping me off of hbs
. I was also worried about all of the logging in the console and not wanting that to show up after someone installs the addon but I just tested and that wont happen. I guess its because the tests are included locally but not when included in an app.
9c019d9
to
d4cda12
Compare
f549589
to
c991613
Compare
transforms/input.js
Outdated
deprecate = require('ember-source/dist/ember.prod').deprecate; | ||
} catch(e) { | ||
deprecate = require('../bower_components/ember/ember.prod').deprecate; | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@rwjblue Could you review this now? I think the only interesting thing in the PR is trying to grab the correct ember. Not sure if we need to support the bower flow as I believe we are dropping ember 3.0+ from bower correct?
c991613
to
e377642
Compare
Related ember.js PR
Closes: #19