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

[CLEANUP beta] Remove deprecated {{each foo as bar}} AST transform #11776

Merged
merged 1 commit into from Jul 16, 2015
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 0 additions & 17 deletions packages/ember-htmlbars/tests/helpers/each_test.js
Original file line number Diff line number Diff line change
Expand Up @@ -448,22 +448,6 @@ QUnit.test('it supports {{itemViewClass=}} with {{else}} block (DEPRECATED)', fu
equal(view.$().text(), 'No records!');
});

QUnit.test('it supports non-context switching with {{itemViewClass=}} (DEPRECATED)', function() {
runDestroy(view);
registry.register('view:foo-view', EmberView.extend({
template: compile(`{{person.name}}`)
}));

view = EmberView.create({
template: compile(`{{each person in view.people itemViewClass="foo-view"}}`),
people: people,
container: container
});

runAppend(view);
equal(view.$().text(), 'Steve HoltAnnabelle');
});

QUnit.test('it supports {{emptyView=}}', function() {
var emptyView = EmberView.extend({
template: compile('emptyView:sad panda')
Expand Down Expand Up @@ -1042,5 +1026,4 @@ QUnit.test('pushing a new duplicate key will trigger a useful error (temporary u
);
});

testEachWithItem('{{#each foo in bar}}', false);
testEachWithItem('{{#each bar as |foo|}}', true);
Original file line number Diff line number Diff line change
Expand Up @@ -885,10 +885,8 @@ QUnit.test('a quoteless string parameter should resolve actionName, including pa
var lastAction;
var actionOrder = [];

ignoreDeprecation(function() {
view = EmberView.create({
template: compile('{{#each item in allactions}}<a id="{{item.name}}" {{action item.name}}>{{item.title}}</a>{{/each}}')
});
view = EmberView.create({
template: compile('{{#each allactions as |item|}}<a id="{{item.name}}" {{action item.name}}>{{item.title}}</a>{{/each}}')
});

var controller = EmberController.extend({
Expand Down
2 changes: 0 additions & 2 deletions packages/ember-template-compiler/lib/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ import compile from 'ember-template-compiler/system/compile';
import template from 'ember-template-compiler/system/template';
import { registerPlugin } from 'ember-template-compiler/plugins';

import TransformEachInToBlockParams from 'ember-template-compiler/plugins/transform-each-in-to-block-params';
import TransformWithAsToHash from 'ember-template-compiler/plugins/transform-with-as-to-hash';
import TransformEachIntoCollection from 'ember-template-compiler/plugins/transform-each-into-collection';
import TransformSingleArgEach from 'ember-template-compiler/plugins/transform-single-arg-each';
Expand All @@ -23,7 +22,6 @@ import DeprecateViewHelper from 'ember-template-compiler/plugins/deprecate-view-
import 'ember-template-compiler/compat';

registerPlugin('ast', TransformWithAsToHash);
registerPlugin('ast', TransformEachInToBlockParams);
registerPlugin('ast', TransformSingleArgEach);
registerPlugin('ast', TransformEachIntoCollection);
registerPlugin('ast', TransformOldBindingSyntax);
Expand Down

This file was deleted.

This file was deleted.

3 changes: 0 additions & 3 deletions tests/node/template-compiler-test.js
Original file line number Diff line number Diff line change
Expand Up @@ -36,9 +36,6 @@ test('uses plugins with precompile', function() {
var templateOutput;
var templateCompiler = require(path.join(distPath, 'ember-template-compiler'));

templateOutput = templateCompiler.precompile('{{#each foo in bar}}{{/each}}');
ok(templateOutput.match(/locals: \["foo"\]/), 'transform each in to block params');

templateOutput = templateCompiler.precompile('{{#with foo as bar}}{{/with}}');
ok(templateOutput.match(/locals: \["bar"\]/), 'transform with as to block params');
});
Expand Down