Skip to content

Commit

Permalink
Revert "Include decorator and class field plugins after TypeScript, i…
Browse files Browse the repository at this point in the history
…f present"

This reverts commit e08b59d.
  • Loading branch information
rwjblue committed Dec 12, 2019
1 parent a72f8b0 commit eeed4fa
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 9 deletions.
6 changes: 3 additions & 3 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -340,8 +340,7 @@ module.exports = {
plugins,
[require.resolve('@babel/plugin-proposal-decorators'), { legacy: true }],
{
before: ['@babel/plugin-proposal-class-properties'],
after: ['@babel/plugin-transform-typescript']
before: ['@babel/plugin-proposal-class-properties', '@babel/plugin-transform-typescript']
}
);
}
Expand All @@ -358,7 +357,8 @@ module.exports = {
plugins,
[require.resolve('@babel/plugin-proposal-class-properties'), { loose: options.loose || false }],
{
after: ['@babel/plugin-proposal-decorators', '@babel/plugin-transform-typescript']
after: ['@babel/plugin-proposal-decorators'],
before: ['@babel/plugin-transform-typescript']
}
);
}
Expand Down
6 changes: 0 additions & 6 deletions node-tests/addon-test.js
Original file line number Diff line number Diff line change
Expand Up @@ -792,12 +792,6 @@ describe('ember-cli-babel', function() {

expect(loosePlugins[1][1].loose).to.equal(true, 'loose setting added correctly');
});

it('should include class fields and decorators after typescript if detected', function() {
let plugins = this.addon._addDecoratorPlugins(['@babel/plugin-transform-typescript'], {});
expect(plugins[0]).to.equal('@babel/plugin-transform-typescript', 'typescript still first');
expect(plugins.length).to.equal(3, 'class fields and decorators added');
});
});

describe('_shouldIncludeHelpers()', function() {
Expand Down

0 comments on commit eeed4fa

Please sign in to comment.