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
level
to benull
if it's virtual. - Add more tests.
- Fix
getAncestors()
fordepth
greater than 1. - Add more tests.
- Make
level
field optional. - Add
parentId
optional 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
where
params 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
options
param fordelete()
. - Bug fix for
getPrevSibling()
,getNextSibling()
,getFirstChild()
,getLastChild()
,getParent()
. - Bug fix for
getDescendants()
,getAncestors()
.
- Add
rootColumnType
option. - Bug fix: set tmp value for rootId in
createRoot()
function.
- Bug fix: replace missed arrow functions to 'function'.
- Add
options
as last argument to all functions making queries. - Replace
transaction
function argument withoptions
.
- Replace arrow functions to 'function'.
- Add
lft
andrgt
togetDescendants
function. - Force
depth
to integer ingetDescendants
andgetAncestors
functions. - Remove unique modifiers from
lft
andrgt
column declaration. - Add options to use different column names for
lft
andrgt
columns. - Add CHANGELOG