Skip to content

Commit

Permalink
use babel 6
Browse files Browse the repository at this point in the history
  • Loading branch information
jamestalmage committed Nov 19, 2015
1 parent 60b2337 commit 297c62e
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 10 deletions.
10 changes: 3 additions & 7 deletions lib/babel.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@ var createEspowerPlugin = require('babel-plugin-espower/create');
var requireFromString = require('require-from-string');
var loudRejection = require('loud-rejection/api')(process);
var resolveFrom = require('resolve-from');
var hasGenerator = require('has-generator');
var serializeValue = require('./serialize-value');
require('babel-polyfill');
var send = require('./send');

var testPath = process.argv[2];
Expand All @@ -24,10 +24,8 @@ var powerAssert = createEspowerPlugin(babel, {
patterns: require('./enhance-assert').PATTERNS
});

// if generators are not supported, use regenerator
var options = {
blacklist: hasGenerator ? ['regenerator'] : [],
optional: hasGenerator ? ['asyncToGenerator', 'runtime'] : ['runtime'],
presets: ['stage-3', 'es2015'],
plugins: [powerAssert]
};

Expand All @@ -40,9 +38,7 @@ process.on('uncaughtException', function (exception) {

// include test file
var transpiled = babel.transformFileSync(testPath, options);
requireFromString(transpiled.code, testPath, {
appendPaths: module.paths
});
requireFromString(transpiled.code, testPath);

// if ava was not required, show an error
if (!exports.avaRequired) {
Expand Down
10 changes: 7 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -73,9 +73,12 @@
"dependencies": {
"arr-flatten": "^1.0.1",
"ava-init": "^0.1.0",
"babel-core": "^5.8.23",
"babel-plugin-espower": "^1.1.0",
"babel-runtime": "^5.8.29",
"babel-core": "^6.1.21",
"babel-plugin-espower": "^2.0.0",
"babel-plugin-transform-runtime": "^6.1.18",
"babel-preset-es2015": "^6.1.18",
"babel-preset-stage-3": "^6.1.18",
"babel-runtime": "^6.1.18",
"bluebird": "^3.0.0",
"chalk": "^1.0.0",
"co-with-promise": "^4.6.0",
Expand Down Expand Up @@ -105,6 +108,7 @@
"update-notifier": "^0.5.0"
},
"devDependencies": {
"babel-polyfill": "^6.1.19",
"coveralls": "^2.11.4",
"nyc": "^3.2.2",
"signal-exit": "^2.1.2",
Expand Down

0 comments on commit 297c62e

Please sign in to comment.