Skip to content

Commit

Permalink
Merge 68f6aba into 173e260
Browse files Browse the repository at this point in the history
  • Loading branch information
homer0 committed Feb 5, 2019
2 parents 173e260 + 68f6aba commit fc96544
Show file tree
Hide file tree
Showing 6 changed files with 2,526 additions and 1,854 deletions.
2 changes: 1 addition & 1 deletion .nvmrc
Original file line number Diff line number Diff line change
@@ -1 +1 @@
6
8
2 changes: 1 addition & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
language: node_js
node_js:
- "6.10"
- "8.11"
after_success:
- 'cat ./coverage/lcov.info | ./node_modules/.bin/coveralls'
28 changes: 14 additions & 14 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,27 +7,27 @@
"author": "Leonardo Apiwan (@homer0) <me@homer0.com>",
"license": "MIT",
"dependencies": {
"babel-plugin-angularjs-annotate": "0.9.0",
"babel-plugin-external-helpers": "6.22.0"
"babel-plugin-angularjs-annotate": "0.10.0"
},
"devDependencies": {
"wootils": "^1.3.2",
"eslint": "4.19.1",
"eslint-config-airbnb-base": "13.0.0",
"eslint-plugin-import": "2.12.0",
"eslint-plugin-node": "6.0.1",
"babel-preset-env": "1.7.0",
"jest-ex": "5.0.0",
"jest-cli": "23.1.0",
"jasmine-expect": "3.8.3",
"wootils": "^1.4.0",
"eslint": "5.13.0",
"eslint-config-airbnb-base": "13.1.0",
"eslint-plugin-import": "2.16.0",
"eslint-plugin-node": "8.0.1",
"@babel/core": "7.2.2",
"@babel/preset-env": "7.3.1",
"jest-ex": "^6.0.0",
"jest-cli": "24.0.0",
"jasmine-expect": "4.0.1",
"esdoc": "1.1.0",
"esdoc-standard-plugin": "1.0.0",
"esdoc-node": "1.0.3",
"coveralls": "3.0.1"
"esdoc-node": "1.0.4",
"coveralls": "3.0.2"
},
"engine-strict": true,
"engines": {
"node": ">=6.0.0",
"node": ">=8.0.0",
"npm": ">=3.0.0"
},
"main": "src/index.js",
Expand Down
7 changes: 3 additions & 4 deletions src/plugin.js
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,6 @@ class ProjextAngularJSPlugin {
*/
this._babelPlugins = [
['angularjs-annotate', { explicitOnly: true }],
'external-helpers',
];
/**
* The list of transformations the AngularJS annotations plugin needs in order to work. The
Expand All @@ -50,9 +49,9 @@ class ProjextAngularJSPlugin {
* @ignore
*/
this._babelRequiredEnvFeatures = [
'transform-es2015-arrow-functions',
'transform-es2015-classes',
'transform-es2015-parameters',
'@babel/plugin-transform-arrow-functions',
'@babel/plugin-transform-classes',
'@babel/plugin-transform-parameters',
];
/**
* The name of the reducer event the service uses to intercept a browser target default HTML
Expand Down
14 changes: 6 additions & 8 deletions tests/plugin.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -107,15 +107,14 @@ describe('plugin:projextAngularJS/main', () => {
let result = null;
const expectedConfigWithEnvFeatures = Object.assign({}, initialBabelConfiguration, {
features: [
'transform-es2015-arrow-functions',
'transform-es2015-classes',
'transform-es2015-parameters',
'@babel/plugin-transform-arrow-functions',
'@babel/plugin-transform-classes',
'@babel/plugin-transform-parameters',
],
});
const expectedConfigWithPlugin = Object.assign({}, expectedConfigWithEnvFeatures, {
plugin: [
['angularjs-annotate', { explicitOnly: true }],
'external-helpers',
],
});
// When
Expand All @@ -129,17 +128,16 @@ describe('plugin:projextAngularJS/main', () => {
expect(babelHelper.addEnvPresetFeature).toHaveBeenCalledWith(
initialBabelConfiguration,
[
'transform-es2015-arrow-functions',
'transform-es2015-classes',
'transform-es2015-parameters',
'@babel/plugin-transform-arrow-functions',
'@babel/plugin-transform-classes',
'@babel/plugin-transform-parameters',
]
);
expect(babelHelper.addPlugin).toHaveBeenCalledTimes(1);
expect(babelHelper.addPlugin).toHaveBeenCalledWith(
expectedConfigWithEnvFeatures,
[
['angularjs-annotate', { explicitOnly: true }],
'external-helpers',
]
);
});
Expand Down

0 comments on commit fc96544

Please sign in to comment.