Sails v0.11 stable released

2,710 views
Skip to first unread message

mikermcneil

unread,
Feb 10, 2015, 9:00:11 PM2/10/15
to sai...@googlegroups.com
Hey everyone,

I've got a few updates.  First of all, I'm happy to announce (at long last) that the latest version of Sails (v0.11 stable) was just released.

What's in v0.11?

v0.11 comes with many minor improvements, as well as some internal cleanup in core. But the biggest changes are that Sails core now (1) allows hooks (aka plugins) to be injected simply by installing them from NPM and (2) supports Socket.io v1.0.

A few hooks that might be of interest:

sails-hook-autoreload - Reloads controllers and models without you having to restart the server.
• sails-hook-dev - Provides diagnostic / debugging information during development.
• sails-hook-machines - Allows you to import machines from your api/machines folder and use them in your Sails app.  This is useful as a more structured alternative to writing custom model methods and/or services.


How do I upgrade?

Upgrading to v0.11 is straightforward-- the biggest thing to watch out for is that you'll need to update your sails.io.js client (this is because the Socket.io v1.0 client is a breaking change). As you upgrade, be sure and check out the complete v0.11 migration guide here.  There is also a changelog with additional details.

To upgrade the CLI tool:

sudo npm install -g sails@latest

To upgrade an existing app, once you've cd'ed into it:

npm install sails@latest --save


What else?

So- a couple of other announcements.  Last November, I gave a talk at Theatre de Paris (dotjs.eu) announcing the Node Machine Project.  Since then, there have been over 100 machines published, with capabilities for everything from sending emails with Mandrill, blasting out SMS with Twilio, authenticating with Facebook or GitHub, processing payments with Stripe, posting messages on Slack, compiling markdown to HTML, minifying JavaScript, and much more.  The goal here is to create standardized interfaces for node modules; something that helps out not just us Sails users but also the Node community at large.  Machines are automatically documented, provide runtime type-checking to prevent errors, (ever see "cannot read property X of undefined"?) and most importantly, an abstraction which simplifies error code negotiation.  If you've ever wondered "How do I use XX with Sails?" this is the answer for you.  I'll be working on example Sails apps in the upcoming weeks in order to show some of the more commonly-requested examples (social login, payment processing, etc.)

Finally, one last thing: the recording from the most recent community forum covers this somewhat already, but if you haven't seen that yet, you should know that I'm stepping down from my day-to-day customer-facing role at Balderdash to allow me to focus full-time on Sails and node-machine.  I'm still the CEO of Balderdash, but I'll be spending less time on calls and more time writing open-source code.  To facilitate this, I've brought on Mike Hostetler from the jQuery Foundation (and formerly of AppendTo) to play the role of CTO and take us to next level.  This is a tremendous move for the project, and has already led to some huge gains in the efficiency of the core team.  I look forward to seeing what 2015 holds.  Thanks to all of you for your continued support.

If you have any questions, please let me know.

- Mike
@mikermcneil



PS- Sails now has almost 10,000 stars on GitHub :)

Luis Lobo Borobia

unread,
Feb 11, 2015, 10:21:49 AM2/11/15
to sai...@googlegroups.com
Thank you Mike for the information, and great news you will be full time on Sails and node machine. Thank you again!

Dave Sag

unread,
Feb 11, 2015, 1:58:41 PM2/11/15
to sai...@googlegroups.com
Awesome work Mike.  I look forward to updating my project this weekend.

Cheers

d

Ambroise Dhenain

unread,
Feb 11, 2015, 2:05:12 PM2/11/15
to Dave Sag, sai...@googlegroups.com
Thank you Mike, I haven't undersood quite well the stuff about the "machines", being the first time I encounter that expression, but it looks great! 
--
Cordialement,

M. Ambroise Dhenain.

Thomas Fritz

unread,
Feb 12, 2015, 7:05:23 AM2/12/15
to sai...@googlegroups.com
Awesome stuff! Thank you to all of who contributed to sails.js and make this possible.
I love the node-machines idea. I hope that many users contribute to that and that many projects use that. Would be great for the whole node/io/javascript ecosystem.

Sails.js is really great! We use it in many of our projects. IMHO the only thing which needs some attention is waterline to support more advanced stuff like transactions, better and more intelligent populate and filter on populated values. What are the plans for the future of waterline? What are the priorities for Waterline?


Cheers and thank you!
Thomas

Ambroise Dhenain

unread,
Feb 12, 2015, 7:10:46 AM2/12/15
to Thomas Fritz, sai...@googlegroups.com
Thomas, Waterline being a separated project managed by other people, I'd advise you to ask that question directly to them ;)

Thomas Fritz

unread,
Feb 12, 2015, 7:14:42 AM2/12/15
to Ambroise Dhenain, sai...@googlegroups.com
Hi,

ok. I just thought so because there is a roadmap.md in the sails folder: https://github.com/balderdashy/sails-docs/blob/0.9/roadmap.md#waterline-orm

cheers
signature.asc

Ambroise Dhenain

unread,
Feb 12, 2015, 7:19:15 AM2/12/15
to Thomas Fritz, sai...@googlegroups.com
Oh. Seems I was wrong! it is indeed another project but managed by the same company, https://github.com/balderdashy/waterline


Todd A

unread,
Feb 17, 2015, 5:23:11 PM2/17/15
to sai...@googlegroups.com
I encountered errors with both commands you listed, so I figured I should share the ways I was able to get them to work.

Running the first command, sudo npm install -g sails@latest, gave me this error:

shell-init: error retrieving current directory: getcwd: cannot access parent directories: Permission denied

adding --unsafe-perms to the command resulted in success:

$ sudo npm install -g --unsafe-perms sails@latest

Here are two links where I found discussion about this problem:
https://github.com/ContentMine/quickscrape/issues/1#issuecomment-44762588

I'll paste some extra output in from my console below the notes of the next error I encountered.

As for the second command:

$ npm install sails@latest --save

I had this error:

Attempt to unlock /Users/[username]/app-folder/node_modules/sails, which hasn't been locked

I was able to fix it by running this command:

sudo chown -R [username] .npm


A link about this one:

Extra output info for the first one:

npm ERR! node v0.10.26

npm ERR! npm  v2.5.1

npm ERR! code ELIFECYCLE


npm ERR! sa...@0.11.0 preinstall: `node ./lib/preinstall_npmcheck.js`

npm ERR! Exit status 8

npm ERR! 

npm ERR! Failed at the sa...@0.11.0 preinstall script 'node ./lib/preinstall_npmcheck.js'.


Thanks for all the awesome work!
Todd

Thijs Koerselman

unread,
Feb 18, 2015, 10:41:23 AM2/18/15
to sai...@googlegroups.com
Thanks for the update and all the hard work! Loving the modularity of Sails.js and the hooks and machines are promising.

@Todd, afaik you better not use sudo with npm, ever. I think the problems you're facing are a result of that. If someone runs into this I advise to delete ~/.npm and fix the user permissions in /user/local with chown.

Cheers,
Thijs

Thijs Koerselman

unread,
Feb 18, 2015, 10:44:22 AM2/18/15
to sai...@googlegroups.com
I just noticed that sudo is in the instructions that Mike gave... What's the idea behind it?

kaasdude Kaasdude

unread,
Mar 3, 2015, 1:44:24 AM3/3/15
to sai...@googlegroups.com
Start to look at: https://github.com/creationix/nvm
No troubles with rights anymore if installed correctly.
(First ensure node is removed first)

Ashley Taylor

unread,
Mar 11, 2015, 5:34:12 PM3/11/15
to sai...@googlegroups.com
Great news. The past few days I've been uhming and aahing about what framework we should commit to using for the next 2 years on our flagship risk management product and this post really builds my confidence in this framework.

Thanks!

Nanang Mahdaen El Agung

unread,
May 27, 2015, 2:13:37 PM5/27/15
to sai...@googlegroups.com
Good news! But sadly, I can't install it on my VPS with warning

sh: 1: node: Permission denied

My VPS don't have "sudo", using ubuntu. But I can install the v0.10.5.

Andi Nugroho Dirgantara

unread,
May 28, 2015, 7:45:06 PM5/28/15
to sai...@googlegroups.com
Maybe you can install node.js using node.js management like nvm. So you doesn't required to use sudo to install any npm modules.

Jhor Santos

unread,
Jul 7, 2015, 12:54:03 PM7/7/15
to sai...@googlegroups.com
Alias ,
How can i use alias in select with sails js ?
 
for example 

Model.find({ where: {empresa:p.empresa},select:['ano']})

i need that 'ano' it have a alias 'codigo'

Reply all
Reply to author
Forward
0 new messages