MyGit

v5.0.0

sezna/nps

版本发布时间: 2017-02-18 13:44:23

sezna/nps最新发布版本:v5.9.12(2019-12-08 03:01:11)

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:

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

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

3566a15b991d6b84e7386bd18b0e08c2e94c6235: 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:

acb7917efdcb1222c578686673ea965f34f6b9f0: 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 :smile:

9bcf1e327c968ca6ea2d5f1786853ad71fe0e499: 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.

b180bad4aa6c0179942dd8d1f4374da8d7ab0c50: 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.

f5e17f4d74164dc0d1aac0fcfb9397bb2450ff47: 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 :)

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

This is thanks to @tmpvar for giving up the name "nps" for his npmsearch-cli package. :clap: 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!

相关地址:原始地址 下载(tar) 下载(zip)

查看:2017-02-18发行的版本