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

Babel core issue? #4

Closed
damionvega opened this issue Mar 5, 2016 · 8 comments
Closed

Babel core issue? #4

damionvega opened this issue Mar 5, 2016 · 8 comments

Comments

@damionvega
Copy link

  ati/ati-api(group)  •  npm t                                                                                                                                                                                                                                                                                                                                   [15:15:12]

> ati-api@1.7.6 test /Users/mbp/work/ati/ati-api
> NODE_ENV=test babel-tap test/test.js

/Users/mbp/work/ati/ati-api/node_modules/babel-tap/node_modules/babel-core/lib/transformation/file/options/option-manager.js:126
      if (!option) this.log.error("Unknown option: " + alias + "." + key, ReferenceError);
                           ^

TypeError: Cannot read property 'error' of undefined
    at OptionManager.mergeOptions (/Users/mbp/work/ati/ati-api/node_modules/babel-tap/node_modules/babel-core/lib/transformation/file/options/option-manager.js:126:28)
    at OptionManager.addConfig (/Users/mbp/work/ati/ati-api/node_modules/babel-tap/node_modules/babel-core/lib/transformation/file/options/option-manager.js:107:10)
    at OptionManager.findConfigs (/Users/mbp/work/ati/ati-api/node_modules/babel-tap/node_modules/babel-core/lib/transformation/file/options/option-manager.js:168:35)
    at OptionManager.init (/Users/mbp/work/ati/ati-api/node_modules/babel-tap/node_modules/babel-core/lib/transformation/file/options/option-manager.js:229:12)
    at compile (/Users/mbp/work/ati/ati-api/node_modules/babel-tap/node_modules/babel-core/lib/api/register/node.js:117:22)
    at normalLoader (/Users/mbp/work/ati/ati-api/node_modules/babel-tap/node_modules/babel-core/lib/api/register/node.js:199:14)
    at Object.require.extensions.(anonymous function) [as .js] (/Users/mbp/work/ati/ati-api/node_modules/babel-tap/node_modules/babel-core/lib/api/register/node.js:216:7)
    at Module.load (module.js:357:32)
    at Function.Module._load (module.js:314:12)
    at Function.Module.runMain (module.js:447:10)
test/test.js .......................................... 0/1
  not ok test/test.js
    results:
      ok: false
      count: 0
      pass: 0
      plan:
        start: 1
        end: 0
        skipAll: true
    command: /Users/mbp/work/ati/ati-api/node_modules/babel-tap/node_modules/babel/bin/babel-node.js
    timeout: 30000
    exitCode: 1
    arguments:
      - test/test.js
    file: test/test.js

total ................................................. 0/1


  0 passing (722.116ms)
  1 failing

npm ERR! Test failed.  See above for more details.

Test:

import { test } from 'babel-tap'


test('Test', t => {

  t.test('first', t => {
    t.plan(1)
    t.pass('done!')
  })

  t.end()
})
@moimikey
Copy link

moimikey commented Mar 9, 2016

i get the same.

@moimikey
Copy link

moimikey commented Mar 9, 2016

ah. here's the beautiful issue:

    "babel": "^5.8.29",

@jkrems
Copy link
Owner

jkrems commented Mar 9, 2016

@moimikey So the issue was that the actual app was using babel 6..?

@moimikey
Copy link

moimikey commented Mar 9, 2016

Babel-tap is using Babel 5.8. So I'm guessing this is the conflict of trying to pair it with a Babel 6 project.

@jkrems
Copy link
Owner

jkrems commented Mar 9, 2016

I have a version that is using babel 6 (#5). The bad news is that babel-node has a pretty hefty startup penalty and tap spawns a child per test file.

jkrems pushed a commit that referenced this issue Mar 9, 2016
This changes `babel-tap` to work with babel 6.

Fixes #4

BREAKING CHANGE: `babel@5` is no longer supported.
Use `babel-tap@4` if you need babel 5 support.
@jkrems jkrems mentioned this issue Mar 9, 2016
@moimikey
Copy link

moimikey commented Mar 9, 2016

@jkrems yeah that definitely stinks. i see what you mean now... for what it's worth, i've read that the delay can also increase due to duplicate dependencies. it won't get rid of the problem, but maybe decrease the wait time. npm dedupe

@jkrems jkrems closed this as completed in #5 Mar 9, 2016
@jkrems
Copy link
Owner

jkrems commented Mar 9, 2016

Published babel-tap@5.0.0 which uses babel 6.

@damionvega
Copy link
Author

Works like a charm. Much appreciated @jkrems

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants
@moimikey @jkrems @damionvega and others