Skip to content

v5.0.0 - the great rename!

Compare
Choose a tag to compare
@kentcdodds kentcdodds released this 18 Feb 05:44
· 80 commits to master since this release

Hi there! I kinda botched things a bit with the release, so you're reading a changelog that I wrote by hand. Fun stuff!

So you can see the enormous diff between the latest p-s version (3.1.0) and nps (v5.0.0) here. I'll give you some highlights:

Backward Compatible Changes:

b80aa2b: fix(init): don't fail when there are no scripts (#99)

Now you can init on a project that has no package.json scripts 🎉

3566a15: fix(load): allow function to be exported (as docs say) (#98)

I don't think anyone was doing this because it never worked, but it does now. So feel free to do it!

Breaking Changes:

acb7917: fix(parallel): remove --parallel in favor of concurrently (#94)

This was a pretty big change! See the linked PR for more on why it was decided to do this. I'm pretty pleased with it to be honest. concurrently is a great package and I'm already loving using it (the labels are cool)! I'm also thinking about making nps-utils which will have utility functions you can use in your package-scripts.js file to make using things like concurrently more ergonomic :)

before:

nps --parallel lint,test,build

after:

concurrently --kill-others "nps lint" "nps test" "nps build"

I realize that's a bit verbose, but writing a function for that is pretty straightforward (and like I said, I may provide one with nps-utils one day). Things can get pretty awesome (and colorful 🌈) with concurrently if you do something like this 😄

9bcf1e3: fix(deps): remove bluebird (#102)

I'm pretty sure it's been awhile since we dropped support for environments that don't support native Promises, but this is the nail in the coffin for that.

b180bad: perf(babel): target node v4 (#103)

Again, I'm pretty sure v4 is our oldest supported version, so we're transpiling down to that version of node now.

f5e17f4: fix(cli): improve handling of forwarding args/flags (#101)

This was a (surprisingly) HUGE refactor. Before, we were using commander and things were pretty hacky (especially for stuff like autocompletion and what-not). With yargs things are much more flexible.

Another significant change here is the change for #100.

before:

nps lint,build "src/**/*.js"

after:

nps "lint src/**/*.js" "build src/**/*.js"

It's kinda sad, but I honestly never really saw anyone utilizing the argument forwarding feature anyway. Where this gets a little more impactful is when you're typing at the command line:

before:

nps test --updateSnapshot

after:

nps "test --updateSnapshot"

Notice the quotes. Those are now required for a command and its arguments to be grouped (otherwise --updateSnapshot will be assumed to be a command you're trying to execute and you'll get an error). Actually, nps will throw an error if you try nps foo --flag because --flag is not a recognized nps flag :)

28141fb: fix(name): rename from p-s to nps

This is thanks to @tmpvar for giving up the name "nps" for his npmsearch-cli package. 👏 Thank you! Now things are much less confusing. There's only one alias. p-s will no longer work:

before: (if you were even using this alias)

p-s test

after:

nps test

That's it! Overall, I'm excited about this release! Thanks for upgrading! If you have any trouble, please file an issue! There are still more issues up for grabs if anyone wants to contribute!