0.6.0 Breaking Changes
-
@a_5mith ^ That change probably broke a lot of your plugins.
If you are updating any of them, you should add a new section into
package.json
:{ ... "nbbpm": { "compatibility": "^0.6.0" } }
NodeBB doesn't read that value yet, but it will soon.
-
Yay. Will do. I noticed @baris offered a PR on one of my plugins, I'll take a look when I'm slightly more awake, had a 4 hour interview today including full competency exam. I'm knackered.
List of affected plugins will be marked as I've updated them in npm.
Youtube Lite (Updated)
Mixcloud (Updated)
My Custom Soundcloud Plugin
Vine
Flipkart
Codepen
Beat.TV
Beatport
Embed.ly
JotForm
Twitch.TV
Vexflow
jsFiddle
Spotify(PR)
Slideshare
HearThis.atLe sigh. Much plugins, very work.
-
Updated with hook changes to
action:topic.save
,action:topic.restore
andaction:topic.edit
.Related thread https://community.nodebb.org/topic/3153/action-topic-save-action-topic-restore-action-topic-edit-changes
Related GH issue https://github.com/NodeBB/NodeBB/issues/2357
-
So with most (all?) multi-argument hooks being updated to use a single data object, what will become of the single argument hooks? Will they get the same treatment with in mind that more data can be added later?
Sorry if this has been discussed before, must've missed it.
-
Ideally we should change those to be objects as well so we don't have to do this amount of breaking changes in the future. Ie stuff like
plugins.fireHook('action:post.delete', pid);
Should be
plugins.fireHook('action:post.delete', {pid: pid, uid:uid});
There aren't alot of these as far as I know so I will make a list and let you all know about the changes here when they happen.
-
-
@baris make every. Single. Hook. Have an object param. That way we will never ever need to worry about breaking changes again!
Seriously: consistency is the best possible thing you can have with software