All notable changes to this project (as a library) will be documented in this file.
This project adheres to Semantic Versioning.
Also, this project likes fast realizes with even one change to get it live shortly.
New features and bug fixes will be here.
- Fix
updateNode(): don't increment level if no level column. - Allow
levelto benullif it's virtual. - Add more tests.
- Fix
getAncestors()fordepthgreater than 1. - Add more tests.
- Make
levelfield optional. - Add
parentIdoptional field. - Add helper tests.
- Fix insert as sibling methods. PR #20 by @ilgiz-badamshin.
- Fix node move between trees. PR #19 by @ilgiz-badamshin.
- Add Sequelize v6 support.
- Update Docs and README.
- Add tests on Node v12.
- Rework
getParent()method. - Fix wrong
whereparams indelete(). PR #15 by @aslubsky.
- Fix
makeRoot()function: it didn't move children to new tree.
- Fix typos in
isDescendantOf()andisDescendantOfOrEqualTo()function description. - Add Sequelize to peerDependencies.
- Add tests for Sequelize v4 and v5.
- Fix potential security vulnerability in dependencies.
- Rename first param in
addChild(). - Remove redundant newRootId param from
makeRoot(). - Add brief API docs in wiki.
- Fix
addChild(),insertAsParentOf(),insertAsLastChildOf(),insertAsFirstChildOf(),insertAsNextSiblingOf(),insertAsPrevSiblingOf(),updateNode(),shiftRlValues(),shiftRlRange(). - Deeply clone options in functions.
- Update dev dependencies.
- Improve
isValidNode(): check record existence.
- Bug fix for
getSiblings().
- Bug fix: disallow calling
createRoot()w/o Sequelize record. - Bug fix: add default value for
optionsparam fordelete(). - Bug fix for
getPrevSibling(),getNextSibling(),getFirstChild(),getLastChild(),getParent(). - Bug fix for
getDescendants(),getAncestors().
- Add
rootColumnTypeoption. - Bug fix: set tmp value for rootId in
createRoot()function.
- Bug fix: replace missed arrow functions to 'function'.
- Add
optionsas last argument to all functions making queries. - Replace
transactionfunction argument withoptions.
- Replace arrow functions to 'function'.
- Add
lftandrgttogetDescendantsfunction. - Force
depthto integer ingetDescendantsandgetAncestorsfunctions. - Remove unique modifiers from
lftandrgtcolumn declaration. - Add options to use different column names for
lftandrgtcolumns. - Add CHANGELOG