karma-runner / grunt-karma

Grunt plugin for Karma.
MIT License
468 stars 116 forks source link

fix: Pass node-specific command line params to the subprocess #117

Closed mgol closed 10 years ago

mgol commented 10 years ago

fix: Pass node-specific command line params to the subprocess

This commit makes the karma task pass Node-specific parameters used to start the Node process to its background subprocess. This is required e.g. to be able to use the --harmony flag.

Similar pull request for Grunt itself (already merged): https://github.com/gruntjs/grunt/pull/877

Should I add tests for it?

EDIT: Note that they aren't all parameters, only Node-specific ones. That's why it's safe. All params lie in process.argv not process.execArgv.

mgol commented 10 years ago

It's been a month; can I do anything to get it merged?

mgol commented 10 years ago

Rebased to fix conflicts with my other PR, #116, that's just been merged.

dignifiedquire commented 10 years ago

Lgtm

mgol commented 10 years ago

Will I get another LGTM? :) I rebased it over latest master.

dignifiedquire commented 10 years ago

Still looks good to me :) @aymericbeaumet can you take a look at this please, so we can merge and ship it to npm?

aymericbeaumet commented 10 years ago

This will be handy, thanks @mzgol!

LGTM

mgol commented 10 years ago

Thanks! Can you publish a new version to npm? It's been a while.

aymericbeaumet commented 10 years ago

@Dignifiedquire Is this repository supposed to be handle by Vojta's deployment script?

mgol commented 10 years ago

@Dignifiedquire @aymericbeaumet ping? :)

dignifiedquire commented 10 years ago

:blush: I told @vojtajina to put it into there, but it doesn't look like he did it yet. Will do it manually for now.

mgol commented 10 years ago

Thanks!

mgol commented 10 years ago

@Dignifiedquire It seems you've created the tag but didn't publish to npm... https://www.npmjs.org/package/grunt-karma still points to 0.8.3

OK, I'll wait.

dignifiedquire commented 10 years ago

@mzgol looks like the site is not up to date, running npm view grunt-karma versions gives me that 0.9.0 was published and if I try installing it it's there as well.

mgol commented 10 years ago

@Dignifiedquire it's because latest still points to 0.8.3. It seems you published it with a tag 0.9.0 for some reason and if you specify the tag, npm will not bind it to latest.

BTW, creating tags that are valid semver ranges will be invalid in future npm client versions (and on the server-side after some time) so you shouldn't use it. What's the point anyway?

dignifiedquire commented 10 years ago

stupid tags.. * fixing *

mgol commented 10 years ago

BTW, if you do npm install grunt-karma@0.9.0, npm will first detect it's a valid semver range and will use the version number, skipping the tag completely. Therefore, all these tags don't make any sense. ;)

And you have a lot of them:

$ npm info grunt-karma dist-tags

{ latest: '0.8.3',
  '0.5.0': '0.5.0',
  '0.5.1': '0.5.1',
  '0.5.3': '0.5.3',
  '0.5.4': '0.5.4',
  '0.7.0': '0.7.0',
  '0.7.1': '0.7.1',
  '0.7.2': '0.7.2',
  '0.7.3': '0.7.3',
  '0.9.0': '0.9.0' }

For comparison:

$ npm info karma dist-tags

{ 'canary-dart': '0.9.2-dart',
  latest: '0.12.23',
  canary: '0.12.16-beta-905422d',
  dev: '0.11.12-dev2',
  old: '0.10.10' }
dignifiedquire commented 10 years ago

OMG :cry: seems grunt-release had an issue or something this is horrible...

dignifiedquire commented 10 years ago

Okay latest now points to 0.9.0, no way of removing the others sadly :(

mgol commented 10 years ago

Works now, thanks!