Adding NpmRun and NpmTest

Review Request #3048 - Created Oct. 28, 2015 and submitted

Information
Chris Pesto
pants
2461
7c60adc...
Reviewers
pants-reviews
jsirois, molsen, stuhood

This addresses #2330 and #2331 - adding support for "test" and "run" goals to Pants.

I would've liked to put an integration test for the "test" goal with a failing test, but I didn't want to check in a failing npm_test target under the examples directory, as it would break using "test contrib/node::". So to do that I have to figure out how to add a new target on the fly in an integration test. The diff is already somewhat large and I was going to put that off.

Note: I talked with @stuhood about the "npm_test" target. I implemented it as described in the design doc (apart from changing its name). We discussed an alternative implementation and how this one could make it more difficult to add the option to resolve targets without their devDependencies in the future. In the end I thought this was a pretty good solution for working with typical Node project structure though, making it easy to adopt Pants. Building a chain of modules without devDependencies is not extremely pressing to me - each target doesn't have its transitive devDependencies under it, just its own, since we're just using "npm install" right now to resolve targets and that doesn't install dependencies' devDependencies.

https://travis-ci.org/pantsbuild/pants/builds/88000050

Issues

  • 0
  • 1
  • 1
  • 2
Description From Last Updated
Matt Olsen
Chris Pesto
Chris Pesto
Stu Hood
Stu Hood
Chris Pesto
Review request changed

Status: Closed (submitted)

Change Summary:

Merged as f46ac7aeee82e63a38d078a7bcde630c5668b0ed

Loading...