diff --git a/.idea/data-structure-typed.iml b/.idea/data-structure-typed.iml
index ac94332..fd37c0b 100644
--- a/.idea/data-structure-typed.iml
+++ b/.idea/data-structure-typed.iml
@@ -11,6 +11,7 @@
+
diff --git a/README.md b/README.md
index 4557519..725f386 100644
--- a/README.md
+++ b/README.md
@@ -371,55 +371,103 @@ import {UndirectedGraph} from 'data-structure-typed';
-## API docs
-
+[//]: # (## API docs)
+
+[//]: # ()
# Why
+## Code design
+By strictly adhering to object-oriented design (BinaryTree -> BST -> AVLTree -> TreeMultiset), you can seamlessly inherit the existing data structures to implement the customized ones you need. Object-oriented design stands as the optimal approach to data structure design.
+
## Complexities
### performance of Big O
@@ -680,9 +728,6 @@ import {UndirectedGraph} from 'data-structure-typed';
-## Code design
-By strictly adhering to object-oriented design (BinaryTree -> BST -> AVLTree -> TreeMultiset), you can seamlessly inherit the existing data structures to implement the customized ones you need. Object-oriented design stands as the optimal approach to data structure design.
-
[//]: # (![overview diagram](https://github.com/zrwusa/assets/blob/master/images/data-structure-typed/assets/overview-diagram-of-data-structures.png?raw=true))
![complexities](https://github.com/zrwusa/assets/blob/master/images/data-structure-typed/assets/complexities-diff.jpg?raw=true)
diff --git a/package-lock.json b/package-lock.json
index a895bf3..af3966f 100644
--- a/package-lock.json
+++ b/package-lock.json
@@ -1,41 +1,42 @@
{
"name": "data-structure-typed",
- "version": "1.21.3",
+ "version": "1.3.3",
"lockfileVersion": 3,
"requires": true,
"packages": {
"": {
"name": "data-structure-typed",
- "version": "1.21.3",
+ "version": "1.3.3",
"license": "MIT",
"devDependencies": {
"@types/jest": "^29.5.3",
"@types/node": "^20.4.9",
- "avl-tree-typed": "^1.21.3",
- "binary-tree-typed": "^1.21.3",
- "bst-typed": "^1.21.3",
+ "avl-tree-typed": "^1.3.3",
+ "binary-tree-typed": "^1.3.3",
+ "bst-typed": "^1.3.3",
"dependency-cruiser": "^13.1.2",
- "deque-typed": "^1.21.3",
- "directed-graph-typed": "^1.21.3",
- "doubly-linked-list-typed": "^1.21.3",
- "graph-typed": "^1.21.3",
- "heap-typed": "^1.21.3",
+ "deque-typed": "^1.3.3",
+ "directed-graph-typed": "^1.3.3",
+ "doubly-linked-list-typed": "^1.3.3",
+ "graph-typed": "^1.3.3",
+ "heap-typed": "^1.3.3",
"jest": "^29.6.2",
- "linked-list-typed": "^1.21.3",
- "max-heap-typed": "^1.21.3",
- "max-priority-queue-typed": "^1.21.3",
- "min-heap-typed": "^1.21.3",
- "min-priority-queue-typed": "^1.21.3",
- "priority-queue-typed": "^1.21.3",
- "singly-linked-list-typed": "^1.21.3",
- "stack-typed": "^1.21.3",
- "tree-multiset-typed": "^1.21.3",
- "trie-typed": "^1.21.3",
+ "linked-list-typed": "^1.3.3",
+ "max-heap-typed": "^1.3.3",
+ "max-priority-queue-typed": "^1.3.3",
+ "min-heap-typed": "^1.3.3",
+ "min-priority-queue-typed": "^1.3.3",
+ "priority-queue-typed": "^1.3.3",
+ "queue-typed": "^1.3.3",
+ "singly-linked-list-typed": "^1.3.3",
+ "stack-typed": "^1.3.3",
+ "tree-multiset-typed": "^1.3.3",
+ "trie-typed": "^1.3.3",
"ts-jest": "^29.1.1",
"ts-loader": "^9.4.4",
"typedoc": "^0.24.8",
"typescript": "^4.9.5",
- "undirected-graph-typed": "^1.21.3",
+ "undirected-graph-typed": "^1.3.3",
"webpack": "^5.88.2",
"webpack-cli": "^5.1.4"
}
@@ -123,30 +124,30 @@
}
},
"node_modules/@babel/compat-data": {
- "version": "7.22.9",
- "resolved": "https://registry.npmjs.org/@babel/compat-data/-/compat-data-7.22.9.tgz",
- "integrity": "sha512-5UamI7xkUcJ3i9qVDS+KFDEK8/7oJ55/sJMB1Ge7IEapr7KfdfV/HErR+koZwOfd+SgtFKOKRhRakdg++DcJpQ==",
+ "version": "7.22.20",
+ "resolved": "https://registry.npmjs.org/@babel/compat-data/-/compat-data-7.22.20.tgz",
+ "integrity": "sha512-BQYjKbpXjoXwFW5jGqiizJQQT/aC7pFm9Ok1OWssonuguICi264lbgMzRp2ZMmRSlfkX6DsWDDcsrctK8Rwfiw==",
"dev": true,
"engines": {
"node": ">=6.9.0"
}
},
"node_modules/@babel/core": {
- "version": "7.22.17",
- "resolved": "https://registry.npmjs.org/@babel/core/-/core-7.22.17.tgz",
- "integrity": "sha512-2EENLmhpwplDux5PSsZnSbnSkB3tZ6QTksgO25xwEL7pIDcNOMhF5v/s6RzwjMZzZzw9Ofc30gHv5ChCC8pifQ==",
+ "version": "7.22.20",
+ "resolved": "https://registry.npmjs.org/@babel/core/-/core-7.22.20.tgz",
+ "integrity": "sha512-Y6jd1ahLubuYweD/zJH+vvOY141v4f9igNQAQ+MBgq9JlHS2iTsZKn1aMsb3vGccZsXI16VzTBw52Xx0DWmtnA==",
"dev": true,
"dependencies": {
"@ampproject/remapping": "^2.2.0",
"@babel/code-frame": "^7.22.13",
"@babel/generator": "^7.22.15",
"@babel/helper-compilation-targets": "^7.22.15",
- "@babel/helper-module-transforms": "^7.22.17",
+ "@babel/helper-module-transforms": "^7.22.20",
"@babel/helpers": "^7.22.15",
"@babel/parser": "^7.22.16",
"@babel/template": "^7.22.15",
- "@babel/traverse": "^7.22.17",
- "@babel/types": "^7.22.17",
+ "@babel/traverse": "^7.22.20",
+ "@babel/types": "^7.22.19",
"convert-source-map": "^1.7.0",
"debug": "^4.1.0",
"gensync": "^1.0.0-beta.2",
@@ -217,9 +218,9 @@
}
},
"node_modules/@babel/helper-environment-visitor": {
- "version": "7.22.5",
- "resolved": "https://registry.npmjs.org/@babel/helper-environment-visitor/-/helper-environment-visitor-7.22.5.tgz",
- "integrity": "sha512-XGmhECfVA/5sAt+H+xpSg0mfrHq6FzNr9Oxh7PSEBBRUb/mL7Kz3NICXb194rCqAEdxkhPT1a88teizAFyvk8Q==",
+ "version": "7.22.20",
+ "resolved": "https://registry.npmjs.org/@babel/helper-environment-visitor/-/helper-environment-visitor-7.22.20.tgz",
+ "integrity": "sha512-zfedSIzFhat/gFhWfHtgWvlec0nqB9YEIVrpuwjruLlXfUSnA8cJB0miHKwqDnQ7d32aKo2xt88/xZptwxbfhA==",
"dev": true,
"engines": {
"node": ">=6.9.0"
@@ -263,16 +264,16 @@
}
},
"node_modules/@babel/helper-module-transforms": {
- "version": "7.22.17",
- "resolved": "https://registry.npmjs.org/@babel/helper-module-transforms/-/helper-module-transforms-7.22.17.tgz",
- "integrity": "sha512-XouDDhQESrLHTpnBtCKExJdyY4gJCdrvH2Pyv8r8kovX2U8G0dRUOT45T9XlbLtuu9CLXP15eusnkprhoPV5iQ==",
+ "version": "7.22.20",
+ "resolved": "https://registry.npmjs.org/@babel/helper-module-transforms/-/helper-module-transforms-7.22.20.tgz",
+ "integrity": "sha512-dLT7JVWIUUxKOs1UnJUBR3S70YK+pKX6AbJgB2vMIvEkZkrfJDbYDJesnPshtKV4LhDOR3Oc5YULeDizRek+5A==",
"dev": true,
"dependencies": {
- "@babel/helper-environment-visitor": "^7.22.5",
+ "@babel/helper-environment-visitor": "^7.22.20",
"@babel/helper-module-imports": "^7.22.15",
"@babel/helper-simple-access": "^7.22.5",
"@babel/helper-split-export-declaration": "^7.22.6",
- "@babel/helper-validator-identifier": "^7.22.15"
+ "@babel/helper-validator-identifier": "^7.22.20"
},
"engines": {
"node": ">=6.9.0"
@@ -324,9 +325,9 @@
}
},
"node_modules/@babel/helper-validator-identifier": {
- "version": "7.22.15",
- "resolved": "https://registry.npmjs.org/@babel/helper-validator-identifier/-/helper-validator-identifier-7.22.15.tgz",
- "integrity": "sha512-4E/F9IIEi8WR94324mbDUMo074YTheJmd7eZF5vITTeYchqAi6sYXRLHUVsmkdmY4QjfKTcB2jB7dVP3NaBElQ==",
+ "version": "7.22.20",
+ "resolved": "https://registry.npmjs.org/@babel/helper-validator-identifier/-/helper-validator-identifier-7.22.20.tgz",
+ "integrity": "sha512-Y4OZ+ytlatR8AI+8KZfKuL5urKp7qey08ha31L8b3BwewJAoJamTzyvxPR/5D+KkdJCGPq/+8TukHBlY10FX9A==",
"dev": true,
"engines": {
"node": ">=6.9.0"
@@ -356,12 +357,12 @@
}
},
"node_modules/@babel/highlight": {
- "version": "7.22.13",
- "resolved": "https://registry.npmjs.org/@babel/highlight/-/highlight-7.22.13.tgz",
- "integrity": "sha512-C/BaXcnnvBCmHTpz/VGZ8jgtE2aYlW4hxDhseJAWZb7gqGM/qtCK6iZUb0TyKFf7BOUsBH7Q7fkRsDRhg1XklQ==",
+ "version": "7.22.20",
+ "resolved": "https://registry.npmjs.org/@babel/highlight/-/highlight-7.22.20.tgz",
+ "integrity": "sha512-dkdMCN3py0+ksCgYmGG8jKeGA/8Tk+gJwSYYlFGxG5lmhfKNoAy004YpLxpS1W2J8m/EK2Ew+yOs9pVRwO89mg==",
"dev": true,
"dependencies": {
- "@babel/helper-validator-identifier": "^7.22.5",
+ "@babel/helper-validator-identifier": "^7.22.20",
"chalk": "^2.4.2",
"js-tokens": "^4.0.0"
},
@@ -629,19 +630,19 @@
}
},
"node_modules/@babel/traverse": {
- "version": "7.22.17",
- "resolved": "https://registry.npmjs.org/@babel/traverse/-/traverse-7.22.17.tgz",
- "integrity": "sha512-xK4Uwm0JnAMvxYZxOVecss85WxTEIbTa7bnGyf/+EgCL5Zt3U7htUpEOWv9detPlamGKuRzCqw74xVglDWpPdg==",
+ "version": "7.22.20",
+ "resolved": "https://registry.npmjs.org/@babel/traverse/-/traverse-7.22.20.tgz",
+ "integrity": "sha512-eU260mPZbU7mZ0N+X10pxXhQFMGTeLb9eFS0mxehS8HZp9o1uSnFeWQuG1UPrlxgA7QoUzFhOnilHDp0AXCyHw==",
"dev": true,
"dependencies": {
"@babel/code-frame": "^7.22.13",
"@babel/generator": "^7.22.15",
- "@babel/helper-environment-visitor": "^7.22.5",
+ "@babel/helper-environment-visitor": "^7.22.20",
"@babel/helper-function-name": "^7.22.5",
"@babel/helper-hoist-variables": "^7.22.5",
"@babel/helper-split-export-declaration": "^7.22.6",
"@babel/parser": "^7.22.16",
- "@babel/types": "^7.22.17",
+ "@babel/types": "^7.22.19",
"debug": "^4.1.0",
"globals": "^11.1.0"
},
@@ -650,13 +651,13 @@
}
},
"node_modules/@babel/types": {
- "version": "7.22.17",
- "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.22.17.tgz",
- "integrity": "sha512-YSQPHLFtQNE5xN9tHuZnzu8vPr61wVTBZdfv1meex1NBosa4iT05k/Jw06ddJugi4bk7The/oSwQGFcksmEJQg==",
+ "version": "7.22.19",
+ "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.22.19.tgz",
+ "integrity": "sha512-P7LAw/LbojPzkgp5oznjE6tQEIWbp4PkkfrZDINTro9zgBRtI324/EYsiSI7lhPbpIQ+DCeR2NNmMWANGGfZsg==",
"dev": true,
"dependencies": {
"@babel/helper-string-parser": "^7.22.5",
- "@babel/helper-validator-identifier": "^7.22.15",
+ "@babel/helper-validator-identifier": "^7.22.19",
"to-fast-properties": "^2.0.0"
},
"engines": {
@@ -721,16 +722,16 @@
}
},
"node_modules/@jest/console": {
- "version": "29.6.4",
- "resolved": "https://registry.npmjs.org/@jest/console/-/console-29.6.4.tgz",
- "integrity": "sha512-wNK6gC0Ha9QeEPSkeJedQuTQqxZYnDPuDcDhVuVatRvMkL4D0VTvFVZj+Yuh6caG2aOfzkUZ36KtCmLNtR02hw==",
+ "version": "29.7.0",
+ "resolved": "https://registry.npmjs.org/@jest/console/-/console-29.7.0.tgz",
+ "integrity": "sha512-5Ni4CU7XHQi32IJ398EEP4RrB8eV09sXP2ROqD4bksHrnTree52PsxvX8tpL8LvTZ3pFzXyPbNQReSN41CAhOg==",
"dev": true,
"dependencies": {
"@jest/types": "^29.6.3",
"@types/node": "*",
"chalk": "^4.0.0",
- "jest-message-util": "^29.6.3",
- "jest-util": "^29.6.3",
+ "jest-message-util": "^29.7.0",
+ "jest-util": "^29.7.0",
"slash": "^3.0.0"
},
"engines": {
@@ -787,15 +788,15 @@
"dev": true
},
"node_modules/@jest/core": {
- "version": "29.6.4",
- "resolved": "https://registry.npmjs.org/@jest/core/-/core-29.6.4.tgz",
- "integrity": "sha512-U/vq5ccNTSVgYH7mHnodHmCffGWHJnz/E1BEWlLuK5pM4FZmGfBn/nrJGLjUsSmyx3otCeqc1T31F4y08AMDLg==",
+ "version": "29.7.0",
+ "resolved": "https://registry.npmjs.org/@jest/core/-/core-29.7.0.tgz",
+ "integrity": "sha512-n7aeXWKMnGtDA48y8TLWJPJmLmmZ642Ceo78cYWEpiD7FzDgmNDV/GCVRorPABdXLJZ/9wzzgZAlHjXjxDHGsg==",
"dev": true,
"dependencies": {
- "@jest/console": "^29.6.4",
- "@jest/reporters": "^29.6.4",
- "@jest/test-result": "^29.6.4",
- "@jest/transform": "^29.6.4",
+ "@jest/console": "^29.7.0",
+ "@jest/reporters": "^29.7.0",
+ "@jest/test-result": "^29.7.0",
+ "@jest/transform": "^29.7.0",
"@jest/types": "^29.6.3",
"@types/node": "*",
"ansi-escapes": "^4.2.1",
@@ -803,21 +804,21 @@
"ci-info": "^3.2.0",
"exit": "^0.1.2",
"graceful-fs": "^4.2.9",
- "jest-changed-files": "^29.6.3",
- "jest-config": "^29.6.4",
- "jest-haste-map": "^29.6.4",
- "jest-message-util": "^29.6.3",
+ "jest-changed-files": "^29.7.0",
+ "jest-config": "^29.7.0",
+ "jest-haste-map": "^29.7.0",
+ "jest-message-util": "^29.7.0",
"jest-regex-util": "^29.6.3",
- "jest-resolve": "^29.6.4",
- "jest-resolve-dependencies": "^29.6.4",
- "jest-runner": "^29.6.4",
- "jest-runtime": "^29.6.4",
- "jest-snapshot": "^29.6.4",
- "jest-util": "^29.6.3",
- "jest-validate": "^29.6.3",
- "jest-watcher": "^29.6.4",
+ "jest-resolve": "^29.7.0",
+ "jest-resolve-dependencies": "^29.7.0",
+ "jest-runner": "^29.7.0",
+ "jest-runtime": "^29.7.0",
+ "jest-snapshot": "^29.7.0",
+ "jest-util": "^29.7.0",
+ "jest-validate": "^29.7.0",
+ "jest-watcher": "^29.7.0",
"micromatch": "^4.0.4",
- "pretty-format": "^29.6.3",
+ "pretty-format": "^29.7.0",
"slash": "^3.0.0",
"strip-ansi": "^6.0.0"
},
@@ -904,37 +905,37 @@
}
},
"node_modules/@jest/environment": {
- "version": "29.6.4",
- "resolved": "https://registry.npmjs.org/@jest/environment/-/environment-29.6.4.tgz",
- "integrity": "sha512-sQ0SULEjA1XUTHmkBRl7A1dyITM9yb1yb3ZNKPX3KlTd6IG7mWUe3e2yfExtC2Zz1Q+mMckOLHmL/qLiuQJrBQ==",
+ "version": "29.7.0",
+ "resolved": "https://registry.npmjs.org/@jest/environment/-/environment-29.7.0.tgz",
+ "integrity": "sha512-aQIfHDq33ExsN4jP1NWGXhxgQ/wixs60gDiKO+XVMd8Mn0NWPWgc34ZQDTb2jKaUWQ7MuwoitXAsN2XVXNMpAw==",
"dev": true,
"dependencies": {
- "@jest/fake-timers": "^29.6.4",
+ "@jest/fake-timers": "^29.7.0",
"@jest/types": "^29.6.3",
"@types/node": "*",
- "jest-mock": "^29.6.3"
+ "jest-mock": "^29.7.0"
},
"engines": {
"node": "^14.15.0 || ^16.10.0 || >=18.0.0"
}
},
"node_modules/@jest/expect": {
- "version": "29.6.4",
- "resolved": "https://registry.npmjs.org/@jest/expect/-/expect-29.6.4.tgz",
- "integrity": "sha512-Warhsa7d23+3X5bLbrbYvaehcgX5TLYhI03JKoedTiI8uJU4IhqYBWF7OSSgUyz4IgLpUYPkK0AehA5/fRclAA==",
+ "version": "29.7.0",
+ "resolved": "https://registry.npmjs.org/@jest/expect/-/expect-29.7.0.tgz",
+ "integrity": "sha512-8uMeAMycttpva3P1lBHB8VciS9V0XAr3GymPpipdyQXbBcuhkLQOSe8E/p92RyAdToS6ZD1tFkX+CkhoECE0dQ==",
"dev": true,
"dependencies": {
- "expect": "^29.6.4",
- "jest-snapshot": "^29.6.4"
+ "expect": "^29.7.0",
+ "jest-snapshot": "^29.7.0"
},
"engines": {
"node": "^14.15.0 || ^16.10.0 || >=18.0.0"
}
},
"node_modules/@jest/expect-utils": {
- "version": "29.6.4",
- "resolved": "https://registry.npmjs.org/@jest/expect-utils/-/expect-utils-29.6.4.tgz",
- "integrity": "sha512-FEhkJhqtvBwgSpiTrocquJCdXPsyvNKcl/n7A3u7X4pVoF4bswm11c9d4AV+kfq2Gpv/mM8x7E7DsRvH+djkrg==",
+ "version": "29.7.0",
+ "resolved": "https://registry.npmjs.org/@jest/expect-utils/-/expect-utils-29.7.0.tgz",
+ "integrity": "sha512-GlsNBWiFQFCVi9QVSx7f5AgMeLxe9YCCs5PuP2O2LdjDAA8Jh9eX7lA1Jq/xdXw3Wb3hyvlFNfZIfcRetSzYcA==",
"dev": true,
"dependencies": {
"jest-get-type": "^29.6.3"
@@ -944,47 +945,47 @@
}
},
"node_modules/@jest/fake-timers": {
- "version": "29.6.4",
- "resolved": "https://registry.npmjs.org/@jest/fake-timers/-/fake-timers-29.6.4.tgz",
- "integrity": "sha512-6UkCwzoBK60edXIIWb0/KWkuj7R7Qq91vVInOe3De6DSpaEiqjKcJw4F7XUet24Wupahj9J6PlR09JqJ5ySDHw==",
+ "version": "29.7.0",
+ "resolved": "https://registry.npmjs.org/@jest/fake-timers/-/fake-timers-29.7.0.tgz",
+ "integrity": "sha512-q4DH1Ha4TTFPdxLsqDXK1d3+ioSL7yL5oCMJZgDYm6i+6CygW5E5xVr/D1HdsGxjt1ZWSfUAs9OxSB/BNelWrQ==",
"dev": true,
"dependencies": {
"@jest/types": "^29.6.3",
"@sinonjs/fake-timers": "^10.0.2",
"@types/node": "*",
- "jest-message-util": "^29.6.3",
- "jest-mock": "^29.6.3",
- "jest-util": "^29.6.3"
+ "jest-message-util": "^29.7.0",
+ "jest-mock": "^29.7.0",
+ "jest-util": "^29.7.0"
},
"engines": {
"node": "^14.15.0 || ^16.10.0 || >=18.0.0"
}
},
"node_modules/@jest/globals": {
- "version": "29.6.4",
- "resolved": "https://registry.npmjs.org/@jest/globals/-/globals-29.6.4.tgz",
- "integrity": "sha512-wVIn5bdtjlChhXAzVXavcY/3PEjf4VqM174BM3eGL5kMxLiZD5CLnbmkEyA1Dwh9q8XjP6E8RwjBsY/iCWrWsA==",
+ "version": "29.7.0",
+ "resolved": "https://registry.npmjs.org/@jest/globals/-/globals-29.7.0.tgz",
+ "integrity": "sha512-mpiz3dutLbkW2MNFubUGUEVLkTGiqW6yLVTA+JbP6fI6J5iL9Y0Nlg8k95pcF8ctKwCS7WVxteBs29hhfAotzQ==",
"dev": true,
"dependencies": {
- "@jest/environment": "^29.6.4",
- "@jest/expect": "^29.6.4",
+ "@jest/environment": "^29.7.0",
+ "@jest/expect": "^29.7.0",
"@jest/types": "^29.6.3",
- "jest-mock": "^29.6.3"
+ "jest-mock": "^29.7.0"
},
"engines": {
"node": "^14.15.0 || ^16.10.0 || >=18.0.0"
}
},
"node_modules/@jest/reporters": {
- "version": "29.6.4",
- "resolved": "https://registry.npmjs.org/@jest/reporters/-/reporters-29.6.4.tgz",
- "integrity": "sha512-sxUjWxm7QdchdrD3NfWKrL8FBsortZeibSJv4XLjESOOjSUOkjQcb0ZHJwfhEGIvBvTluTzfG2yZWZhkrXJu8g==",
+ "version": "29.7.0",
+ "resolved": "https://registry.npmjs.org/@jest/reporters/-/reporters-29.7.0.tgz",
+ "integrity": "sha512-DApq0KJbJOEzAFYjHADNNxAE3KbhxQB1y5Kplb5Waqw6zVbuWatSnMjE5gs8FUgEPmNsnZA3NCWl9NG0ia04Pg==",
"dev": true,
"dependencies": {
"@bcoe/v8-coverage": "^0.2.3",
- "@jest/console": "^29.6.4",
- "@jest/test-result": "^29.6.4",
- "@jest/transform": "^29.6.4",
+ "@jest/console": "^29.7.0",
+ "@jest/test-result": "^29.7.0",
+ "@jest/transform": "^29.7.0",
"@jest/types": "^29.6.3",
"@jridgewell/trace-mapping": "^0.3.18",
"@types/node": "*",
@@ -998,9 +999,9 @@
"istanbul-lib-report": "^3.0.0",
"istanbul-lib-source-maps": "^4.0.0",
"istanbul-reports": "^3.1.3",
- "jest-message-util": "^29.6.3",
- "jest-util": "^29.6.3",
- "jest-worker": "^29.6.4",
+ "jest-message-util": "^29.7.0",
+ "jest-util": "^29.7.0",
+ "jest-worker": "^29.7.0",
"slash": "^3.0.0",
"string-length": "^4.0.1",
"strip-ansi": "^6.0.0",
@@ -1157,12 +1158,12 @@
}
},
"node_modules/@jest/test-result": {
- "version": "29.6.4",
- "resolved": "https://registry.npmjs.org/@jest/test-result/-/test-result-29.6.4.tgz",
- "integrity": "sha512-uQ1C0AUEN90/dsyEirgMLlouROgSY+Wc/JanVVk0OiUKa5UFh7sJpMEM3aoUBAz2BRNvUJ8j3d294WFuRxSyOQ==",
+ "version": "29.7.0",
+ "resolved": "https://registry.npmjs.org/@jest/test-result/-/test-result-29.7.0.tgz",
+ "integrity": "sha512-Fdx+tv6x1zlkJPcWXmMDAG2HBnaR9XPSd5aDWQVsfrZmLVT3lU1cwyxLgRmXR9yrq4NBoEm9BMsfgFzTQAbJYA==",
"dev": true,
"dependencies": {
- "@jest/console": "^29.6.4",
+ "@jest/console": "^29.7.0",
"@jest/types": "^29.6.3",
"@types/istanbul-lib-coverage": "^2.0.0",
"collect-v8-coverage": "^1.0.0"
@@ -1172,14 +1173,14 @@
}
},
"node_modules/@jest/test-sequencer": {
- "version": "29.6.4",
- "resolved": "https://registry.npmjs.org/@jest/test-sequencer/-/test-sequencer-29.6.4.tgz",
- "integrity": "sha512-E84M6LbpcRq3fT4ckfKs9ryVanwkaIB0Ws9bw3/yP4seRLg/VaCZ/LgW0MCq5wwk4/iP/qnilD41aj2fsw2RMg==",
+ "version": "29.7.0",
+ "resolved": "https://registry.npmjs.org/@jest/test-sequencer/-/test-sequencer-29.7.0.tgz",
+ "integrity": "sha512-GQwJ5WZVrKnOJuiYiAF52UNUJXgTZx1NHjFSEB0qEMmSZKAkdMoIzw/Cj6x6NF4AvV23AUqDpFzQkN/eYCYTxw==",
"dev": true,
"dependencies": {
- "@jest/test-result": "^29.6.4",
+ "@jest/test-result": "^29.7.0",
"graceful-fs": "^4.2.9",
- "jest-haste-map": "^29.6.4",
+ "jest-haste-map": "^29.7.0",
"slash": "^3.0.0"
},
"engines": {
@@ -1187,9 +1188,9 @@
}
},
"node_modules/@jest/transform": {
- "version": "29.6.4",
- "resolved": "https://registry.npmjs.org/@jest/transform/-/transform-29.6.4.tgz",
- "integrity": "sha512-8thgRSiXUqtr/pPGY/OsyHuMjGyhVnWrFAwoxmIemlBuiMyU1WFs0tXoNxzcr4A4uErs/ABre76SGmrr5ab/AA==",
+ "version": "29.7.0",
+ "resolved": "https://registry.npmjs.org/@jest/transform/-/transform-29.7.0.tgz",
+ "integrity": "sha512-ok/BTPFzFKVMwO5eOHRrvnBVHdRy9IrsrW1GpMaQ9MCnilNLXQKmAX8s1YXDFaai9xJpac2ySzV0YeRRECr2Vw==",
"dev": true,
"dependencies": {
"@babel/core": "^7.11.6",
@@ -1200,9 +1201,9 @@
"convert-source-map": "^2.0.0",
"fast-json-stable-stringify": "^2.1.0",
"graceful-fs": "^4.2.9",
- "jest-haste-map": "^29.6.4",
+ "jest-haste-map": "^29.7.0",
"jest-regex-util": "^29.6.3",
- "jest-util": "^29.6.3",
+ "jest-util": "^29.7.0",
"micromatch": "^4.0.4",
"pirates": "^4.0.4",
"slash": "^3.0.0",
@@ -1420,9 +1421,9 @@
}
},
"node_modules/@types/babel__core": {
- "version": "7.20.1",
- "resolved": "https://registry.npmjs.org/@types/babel__core/-/babel__core-7.20.1.tgz",
- "integrity": "sha512-aACu/U/omhdk15O4Nfb+fHgH/z3QsfQzpnvRZhYhThms83ZnAOZz7zZAWO7mn2yyNQaA4xTO8GLK3uqFU4bYYw==",
+ "version": "7.20.2",
+ "resolved": "https://registry.npmjs.org/@types/babel__core/-/babel__core-7.20.2.tgz",
+ "integrity": "sha512-pNpr1T1xLUc2l3xJKuPtsEky3ybxN3m4fJkknfIpTCTfIZCDW57oAg+EfCgIIp2rvCe0Wn++/FfodDS4YXxBwA==",
"dev": true,
"dependencies": {
"@babel/parser": "^7.20.7",
@@ -1433,18 +1434,18 @@
}
},
"node_modules/@types/babel__generator": {
- "version": "7.6.4",
- "resolved": "https://registry.npmjs.org/@types/babel__generator/-/babel__generator-7.6.4.tgz",
- "integrity": "sha512-tFkciB9j2K755yrTALxD44McOrk+gfpIpvC3sxHjRawj6PfnQxrse4Clq5y/Rq+G3mrBurMax/lG8Qn2t9mSsg==",
+ "version": "7.6.5",
+ "resolved": "https://registry.npmjs.org/@types/babel__generator/-/babel__generator-7.6.5.tgz",
+ "integrity": "sha512-h9yIuWbJKdOPLJTbmSpPzkF67e659PbQDba7ifWm5BJ8xTv+sDmS7rFmywkWOvXedGTivCdeGSIIX8WLcRTz8w==",
"dev": true,
"dependencies": {
"@babel/types": "^7.0.0"
}
},
"node_modules/@types/babel__template": {
- "version": "7.4.1",
- "resolved": "https://registry.npmjs.org/@types/babel__template/-/babel__template-7.4.1.tgz",
- "integrity": "sha512-azBFKemX6kMg5Io+/rdGT0dkGreboUVR0Cdm3fz9QJWpaQGJRQXl7C+6hOTCZcMll7KFyEQpgbYI2lHdsS4U7g==",
+ "version": "7.4.2",
+ "resolved": "https://registry.npmjs.org/@types/babel__template/-/babel__template-7.4.2.tgz",
+ "integrity": "sha512-/AVzPICMhMOMYoSx9MoKpGDKdBRsIXMNByh1PXSZoa+v6ZoLa8xxtsT/uLQ/NJm0XVAWl/BvId4MlDeXJaeIZQ==",
"dev": true,
"dependencies": {
"@babel/parser": "^7.1.0",
@@ -1452,9 +1453,9 @@
}
},
"node_modules/@types/babel__traverse": {
- "version": "7.20.1",
- "resolved": "https://registry.npmjs.org/@types/babel__traverse/-/babel__traverse-7.20.1.tgz",
- "integrity": "sha512-MitHFXnhtgwsGZWtT68URpOvLN4EREih1u3QtQiN4VdAxWKRVvGCSvw/Qth0M0Qq3pJpnGOu5JaM/ydK7OGbqg==",
+ "version": "7.20.2",
+ "resolved": "https://registry.npmjs.org/@types/babel__traverse/-/babel__traverse-7.20.2.tgz",
+ "integrity": "sha512-ojlGK1Hsfce93J0+kn3H5R73elidKUaZonirN33GSmgTUMpzI/MIFfSpF3haANe3G1bEBS9/9/QEqwTzwqFsKw==",
"dev": true,
"dependencies": {
"@babel/types": "^7.20.7"
@@ -1520,9 +1521,9 @@
}
},
"node_modules/@types/jest": {
- "version": "29.5.4",
- "resolved": "https://registry.npmjs.org/@types/jest/-/jest-29.5.4.tgz",
- "integrity": "sha512-PhglGmhWeD46FYOVLt3X7TiWjzwuVGW9wG/4qocPevXMjCmrIc5b6db9WjeGE4QYVpUAWMDv3v0IiBwObY289A==",
+ "version": "29.5.5",
+ "resolved": "https://registry.npmjs.org/@types/jest/-/jest-29.5.5.tgz",
+ "integrity": "sha512-ebylz2hnsWR9mYvmBFbXJXr+33UPc4+ZdxyDXh5w0FlPBTfCVN3wPL+kuOiQt3xvrK419v7XWeAs+AeOksafXg==",
"dev": true,
"dependencies": {
"expect": "^29.0.0",
@@ -1530,15 +1531,15 @@
}
},
"node_modules/@types/json-schema": {
- "version": "7.0.12",
- "resolved": "https://registry.npmjs.org/@types/json-schema/-/json-schema-7.0.12.tgz",
- "integrity": "sha512-Hr5Jfhc9eYOQNPYO5WLDq/n4jqijdHNlDXjuAQkkt+mWdQR+XJToOHrsD4cPaMXpn6KO7y2+wM8AZEs8VpBLVA==",
+ "version": "7.0.13",
+ "resolved": "https://registry.npmjs.org/@types/json-schema/-/json-schema-7.0.13.tgz",
+ "integrity": "sha512-RbSSoHliUbnXj3ny0CNFOoxrIDV6SUGyStHsvDqosw6CkdPV8TtWGlfecuK4ToyMEAql6pzNxgCFKanovUzlgQ==",
"dev": true
},
"node_modules/@types/node": {
- "version": "20.6.0",
- "resolved": "https://registry.npmjs.org/@types/node/-/node-20.6.0.tgz",
- "integrity": "sha512-najjVq5KN2vsH2U/xyh2opaSEz6cZMR2SetLIlxlj08nOcmPOemJmUK2o4kUzfLqfrWE0PIrNeE16XhYDd3nqg==",
+ "version": "20.6.2",
+ "resolved": "https://registry.npmjs.org/@types/node/-/node-20.6.2.tgz",
+ "integrity": "sha512-Y+/1vGBHV/cYk6OI1Na/LHzwnlNCAfU3ZNGrc1LdRe/LAIbdDPTTv/HU3M7yXN448aTVDq3eKRm2cg7iKLb8gw==",
"dev": true
},
"node_modules/@types/stack-utils": {
@@ -1905,22 +1906,21 @@
}
},
"node_modules/avl-tree-typed": {
- "version": "1.21.3",
- "resolved": "https://registry.npmjs.org/avl-tree-typed/-/avl-tree-typed-1.21.3.tgz",
- "integrity": "sha512-r+CyVvaTy89z7THAePFsHFU1CbqU+mW66iAcBhl+ZBkn2aHLEksy+xEi7H7Axvq9Z7WEPiIDkwjDb+9gl6lrXg==",
+ "version": "1.3.3",
+ "resolved": "https://registry.npmjs.org/avl-tree-typed/-/avl-tree-typed-1.3.3.tgz",
+ "integrity": "sha512-1lrKBu9QTsikYI4BsVmSguj4DzUwVRQDFpIEbzMVMcBmvXJJ2QXoXu+KHagBEMl+U9JRykKa/kT2jAjydH6VCQ==",
"dev": true,
"dependencies": {
- "data-structure-typed": "^1.21.3",
- "zod": "^3.22.2"
+ "data-structure-typed": "^1.3.3"
}
},
"node_modules/babel-jest": {
- "version": "29.6.4",
- "resolved": "https://registry.npmjs.org/babel-jest/-/babel-jest-29.6.4.tgz",
- "integrity": "sha512-meLj23UlSLddj6PC+YTOFRgDAtjnZom8w/ACsrx0gtPtv5cJZk0A5Unk5bV4wixD7XaPCN1fQvpww8czkZURmw==",
+ "version": "29.7.0",
+ "resolved": "https://registry.npmjs.org/babel-jest/-/babel-jest-29.7.0.tgz",
+ "integrity": "sha512-BrvGY3xZSwEcCzKvKsCi2GgHqDqsYkOP4/by5xCgIwGXQxIEh+8ew3gmrE1y7XRR6LHZIj6yLYnUi/mm2KXKBg==",
"dev": true,
"dependencies": {
- "@jest/transform": "^29.6.4",
+ "@jest/transform": "^29.7.0",
"@types/babel__core": "^7.1.14",
"babel-plugin-istanbul": "^6.1.1",
"babel-preset-jest": "^29.6.3",
@@ -2086,13 +2086,12 @@
"dev": true
},
"node_modules/binary-tree-typed": {
- "version": "1.21.3",
- "resolved": "https://registry.npmjs.org/binary-tree-typed/-/binary-tree-typed-1.21.3.tgz",
- "integrity": "sha512-bkYpnvJ23WBOjBoZ8X7D/XKrYmIwMUa8Yqg/jPc8g+PT44aMBRk10nRrzjQjDDwHdGVyd3KOpwYOXFo/gjeH4A==",
+ "version": "1.3.3",
+ "resolved": "https://registry.npmjs.org/binary-tree-typed/-/binary-tree-typed-1.3.3.tgz",
+ "integrity": "sha512-swfvq/xhIij2SUT6VnNVn0/+3ytf84MS1FhPlxYt0AOMG2cnc0YZQFtK+jKFh9VksNPQWBZgnGZY+m2ig0DqDA==",
"dev": true,
"dependencies": {
- "data-structure-typed": "^1.21.3",
- "zod": "^3.22.2"
+ "data-structure-typed": "^1.3.3"
}
},
"node_modules/brace-expansion": {
@@ -2170,13 +2169,12 @@
}
},
"node_modules/bst-typed": {
- "version": "1.21.3",
- "resolved": "https://registry.npmjs.org/bst-typed/-/bst-typed-1.21.3.tgz",
- "integrity": "sha512-m1rIVcgzqwBAFfctlsouEElvmklHDK02i0g5QnzYMIPL94EHcFIRaqMFHwLDQAkynvo9zCLlxU0j9qzvHVRMGA==",
+ "version": "1.3.3",
+ "resolved": "https://registry.npmjs.org/bst-typed/-/bst-typed-1.3.3.tgz",
+ "integrity": "sha512-PjoU2wIGwwLmuO6YYnT7KqU+F+rlSZqxke93XScTsNUsHs9M8KJTx066pGf1Z9rSmBvohjdjtKwkGgqDEbbM7Q==",
"dev": true,
"dependencies": {
- "data-structure-typed": "^1.21.3",
- "zod": "^3.22.2"
+ "data-structure-typed": "^1.3.3"
}
},
"node_modules/buffer-from": {
@@ -2204,9 +2202,9 @@
}
},
"node_modules/caniuse-lite": {
- "version": "1.0.30001532",
- "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001532.tgz",
- "integrity": "sha512-FbDFnNat3nMnrROzqrsg314zhqN5LGQ1kyyMk2opcrwGbVGpHRhgCWtAgD5YJUqNAiQ+dklreil/c3Qf1dfCTw==",
+ "version": "1.0.30001538",
+ "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001538.tgz",
+ "integrity": "sha512-HWJnhnID+0YMtGlzcp3T9drmBJUVDchPJ08tpUGFLs9CYlwWPH2uLgpHn8fND5pCgXVtnGS3H4QR9XLMHVNkHw==",
"dev": true,
"funding": [
{
@@ -2451,6 +2449,76 @@
"integrity": "sha512-Kvp459HrV2FEJ1CAsi1Ku+MY3kasH19TFykTz2xWmMeq6bk2NU3XXvfJ+Q61m0xktWwt+1HSYf3JZsTms3aRJg==",
"dev": true
},
+ "node_modules/create-jest": {
+ "version": "29.7.0",
+ "resolved": "https://registry.npmjs.org/create-jest/-/create-jest-29.7.0.tgz",
+ "integrity": "sha512-Adz2bdH0Vq3F53KEMJOoftQFutWCukm6J24wbPWRO4k1kMY7gS7ds/uoJkNuV8wDCtWWnuwGcJwpWcih+zEW1Q==",
+ "dev": true,
+ "dependencies": {
+ "@jest/types": "^29.6.3",
+ "chalk": "^4.0.0",
+ "exit": "^0.1.2",
+ "graceful-fs": "^4.2.9",
+ "jest-config": "^29.7.0",
+ "jest-util": "^29.7.0",
+ "prompts": "^2.0.1"
+ },
+ "bin": {
+ "create-jest": "bin/create-jest.js"
+ },
+ "engines": {
+ "node": "^14.15.0 || ^16.10.0 || >=18.0.0"
+ }
+ },
+ "node_modules/create-jest/node_modules/ansi-styles": {
+ "version": "4.3.0",
+ "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz",
+ "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==",
+ "dev": true,
+ "dependencies": {
+ "color-convert": "^2.0.1"
+ },
+ "engines": {
+ "node": ">=8"
+ },
+ "funding": {
+ "url": "https://github.com/chalk/ansi-styles?sponsor=1"
+ }
+ },
+ "node_modules/create-jest/node_modules/chalk": {
+ "version": "4.1.2",
+ "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz",
+ "integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==",
+ "dev": true,
+ "dependencies": {
+ "ansi-styles": "^4.1.0",
+ "supports-color": "^7.1.0"
+ },
+ "engines": {
+ "node": ">=10"
+ },
+ "funding": {
+ "url": "https://github.com/chalk/chalk?sponsor=1"
+ }
+ },
+ "node_modules/create-jest/node_modules/color-convert": {
+ "version": "2.0.1",
+ "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz",
+ "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==",
+ "dev": true,
+ "dependencies": {
+ "color-name": "~1.1.4"
+ },
+ "engines": {
+ "node": ">=7.0.0"
+ }
+ },
+ "node_modules/create-jest/node_modules/color-name": {
+ "version": "1.1.4",
+ "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz",
+ "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==",
+ "dev": true
+ },
"node_modules/cross-spawn": {
"version": "7.0.3",
"resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-7.0.3.tgz",
@@ -2466,9 +2534,9 @@
}
},
"node_modules/data-structure-typed": {
- "version": "1.21.3",
- "resolved": "https://registry.npmjs.org/data-structure-typed/-/data-structure-typed-1.21.3.tgz",
- "integrity": "sha512-1HRQH46pcgMfyIMMrucw1L1JR4MwIvSq0qKqLdeJEV3qvwbi3SN0dXjaIQzpO9lYaHDgrB42rIxNgQ+ak74scA==",
+ "version": "1.3.3",
+ "resolved": "https://registry.npmjs.org/data-structure-typed/-/data-structure-typed-1.3.3.tgz",
+ "integrity": "sha512-cQNIBSPeFVpjgBPWPDdEvOeWbsH6DurH9+EurN0EE8bJtK0zUhcTkgB7/vGmJldXykRS6KITxAqbwdcewcP12w==",
"dev": true
},
"node_modules/debug": {
@@ -2557,13 +2625,12 @@
}
},
"node_modules/deque-typed": {
- "version": "1.21.3",
- "resolved": "https://registry.npmjs.org/deque-typed/-/deque-typed-1.21.3.tgz",
- "integrity": "sha512-GE4+pM/t0VjcNa1Ei8wQE5rq1giCYWWLmsg2QYTJ6zbqRhU0axQZddAruhY9RLvlW0XXMtRhmC77LvLoYXjNxw==",
+ "version": "1.3.3",
+ "resolved": "https://registry.npmjs.org/deque-typed/-/deque-typed-1.3.3.tgz",
+ "integrity": "sha512-7g1Hh9v7rCZnnTJEem7916SYl8ofusczzo4UIWxUKjCRki7e1SG2fcWx1o3S7YCs6+6lNAPjHK796DHmpvYdDQ==",
"dev": true,
"dependencies": {
- "data-structure-typed": "^1.21.3",
- "zod": "^3.22.2"
+ "data-structure-typed": "^1.3.3"
}
},
"node_modules/detect-newline": {
@@ -2585,23 +2652,21 @@
}
},
"node_modules/directed-graph-typed": {
- "version": "1.21.3",
- "resolved": "https://registry.npmjs.org/directed-graph-typed/-/directed-graph-typed-1.21.3.tgz",
- "integrity": "sha512-MFcY1Py97Aj3r+KburlKWjHsecyZDNZxag+Buuyz2cdHFbInBGdcJ88qRIFEmJA6MGM8wBy9mSPKkEsstN9JtQ==",
+ "version": "1.3.3",
+ "resolved": "https://registry.npmjs.org/directed-graph-typed/-/directed-graph-typed-1.3.3.tgz",
+ "integrity": "sha512-3dwjBo1tyO3mMR7e6hK9wcobi/uuOLbxF2Dq9KohbFPLNwtE5s9VqZaAy4HosV0PfdJv9r+tSXW9DqvwR+KqIw==",
"dev": true,
"dependencies": {
- "data-structure-typed": "^1.21.3",
- "zod": "^3.22.2"
+ "data-structure-typed": "^1.3.3"
}
},
"node_modules/doubly-linked-list-typed": {
- "version": "1.21.3",
- "resolved": "https://registry.npmjs.org/doubly-linked-list-typed/-/doubly-linked-list-typed-1.21.3.tgz",
- "integrity": "sha512-jbeAv/VoM8/fmUx9dKhPgK9thCsuuqqvFMe3TFhTMFU/MHboRLTJ0el+1oeM+g5GoTaaaqRZUe9Lr9vNTJYJqQ==",
+ "version": "1.3.3",
+ "resolved": "https://registry.npmjs.org/doubly-linked-list-typed/-/doubly-linked-list-typed-1.3.3.tgz",
+ "integrity": "sha512-sxLEEJj4C5jJxe8e58RtZHpcCcPij6anubm6F/k7v7NFa2rnfVJuDGRSsNRbgKDzymHGsZ38jEp8bcTNI9e+Mg==",
"dev": true,
"dependencies": {
- "data-structure-typed": "^1.21.3",
- "zod": "^3.22.2"
+ "data-structure-typed": "^1.3.3"
}
},
"node_modules/eastasianwidth": {
@@ -2611,9 +2676,9 @@
"dev": true
},
"node_modules/electron-to-chromium": {
- "version": "1.4.513",
- "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.4.513.tgz",
- "integrity": "sha512-cOB0xcInjm+E5qIssHeXJ29BaUyWpMyFKT5RB3bsLENDheCja0wMkHJyiPl0NBE/VzDI7JDuNEQWhe6RitEUcw==",
+ "version": "1.4.523",
+ "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.4.523.tgz",
+ "integrity": "sha512-9AreocSUWnzNtvLcbpng6N+GkXnCcBR80IQkxRC9Dfdyg4gaWNUPBujAHUpKkiUkoSoR9UlhA4zD/IgBklmhzg==",
"dev": true
},
"node_modules/emittery": {
@@ -2669,9 +2734,9 @@
}
},
"node_modules/es-module-lexer": {
- "version": "1.3.0",
- "resolved": "https://registry.npmjs.org/es-module-lexer/-/es-module-lexer-1.3.0.tgz",
- "integrity": "sha512-vZK7T0N2CBmBOixhmjdqx2gWVbFZ4DXZ/NyRMZVlJXPa7CyFS+/a4QQsDGDQy9ZfEzxFuNEsMLeQJnKP2p5/JA==",
+ "version": "1.3.1",
+ "resolved": "https://registry.npmjs.org/es-module-lexer/-/es-module-lexer-1.3.1.tgz",
+ "integrity": "sha512-JUFAyicQV9mXc3YRxPnDlrfBKpqt6hUYzz9/boprUJHs4e4KVr3XwOF70doO6gwXUor6EWZJAyWAfKki84t20Q==",
"dev": true
},
"node_modules/escalade": {
@@ -2799,16 +2864,16 @@
}
},
"node_modules/expect": {
- "version": "29.6.4",
- "resolved": "https://registry.npmjs.org/expect/-/expect-29.6.4.tgz",
- "integrity": "sha512-F2W2UyQ8XYyftHT57dtfg8Ue3X5qLgm2sSug0ivvLRH/VKNRL/pDxg/TH7zVzbQB0tu80clNFy6LU7OS/VSEKA==",
+ "version": "29.7.0",
+ "resolved": "https://registry.npmjs.org/expect/-/expect-29.7.0.tgz",
+ "integrity": "sha512-2Zks0hf1VLFYI1kbh0I5jP3KHHyCHpkfyHBzsSXRFgl/Bg9mWYfMW8oD+PdMPlEwy5HNsR9JutYy6pMeOh61nw==",
"dev": true,
"dependencies": {
- "@jest/expect-utils": "^29.6.4",
+ "@jest/expect-utils": "^29.7.0",
"jest-get-type": "^29.6.3",
- "jest-matcher-utils": "^29.6.4",
- "jest-message-util": "^29.6.3",
- "jest-util": "^29.6.3"
+ "jest-matcher-utils": "^29.7.0",
+ "jest-message-util": "^29.7.0",
+ "jest-util": "^29.7.0"
},
"engines": {
"node": "^14.15.0 || ^16.10.0 || >=18.0.0"
@@ -3025,13 +3090,12 @@
"dev": true
},
"node_modules/graph-typed": {
- "version": "1.21.3",
- "resolved": "https://registry.npmjs.org/graph-typed/-/graph-typed-1.21.3.tgz",
- "integrity": "sha512-RLSgAY4IyEgkdXKXfwh886KomgwLeLO4vgp6JHjv5kwZLNIZ3nFOsOJCEjx+tWC6sKGnxIdlXhzUrSALMjclLg==",
+ "version": "1.3.3",
+ "resolved": "https://registry.npmjs.org/graph-typed/-/graph-typed-1.3.3.tgz",
+ "integrity": "sha512-wJvbk4kFCEkCYs6lJ1QjEUT5GsZXBbn7qaA4Qwt4c/HTEJbX6X63fYkomAf8kqoSQuTlXr+yk8WfZJYWDiJULg==",
"dev": true,
"dependencies": {
- "data-structure-typed": "^1.21.3",
- "zod": "^3.22.2"
+ "data-structure-typed": "^1.3.3"
}
},
"node_modules/has": {
@@ -3056,13 +3120,12 @@
}
},
"node_modules/heap-typed": {
- "version": "1.21.3",
- "resolved": "https://registry.npmjs.org/heap-typed/-/heap-typed-1.21.3.tgz",
- "integrity": "sha512-7lqPbHfEuKxLSnPHHb9PMmVLGEf1d/ly0vZ/KLoAQef3z2cLS3A5xg2HU2J1R9wySNjT39x1qN7tOUrokYqwmg==",
+ "version": "1.3.3",
+ "resolved": "https://registry.npmjs.org/heap-typed/-/heap-typed-1.3.3.tgz",
+ "integrity": "sha512-j0tnpR+v2ul3bHM3VoRSY6b8M73FaSzmbZNwSNxhJ7YRt/isLF1V7LOMZeFeQUj+fO902f0IZqqGanEFRux/uA==",
"dev": true,
"dependencies": {
- "data-structure-typed": "^1.21.3",
- "zod": "^3.22.2"
+ "data-structure-typed": "^1.3.3"
}
},
"node_modules/html-escaper": {
@@ -3369,15 +3432,15 @@
}
},
"node_modules/jest": {
- "version": "29.6.4",
- "resolved": "https://registry.npmjs.org/jest/-/jest-29.6.4.tgz",
- "integrity": "sha512-tEFhVQFF/bzoYV1YuGyzLPZ6vlPrdfvDmmAxudA1dLEuiztqg2Rkx20vkKY32xiDROcD2KXlgZ7Cu8RPeEHRKw==",
+ "version": "29.7.0",
+ "resolved": "https://registry.npmjs.org/jest/-/jest-29.7.0.tgz",
+ "integrity": "sha512-NIy3oAFp9shda19hy4HK0HRTWKtPJmGdnvywu01nOqNC2vZg+Z+fvJDxpMQA88eb2I9EcafcdjYgsDthnYTvGw==",
"dev": true,
"dependencies": {
- "@jest/core": "^29.6.4",
+ "@jest/core": "^29.7.0",
"@jest/types": "^29.6.3",
"import-local": "^3.0.2",
- "jest-cli": "^29.6.4"
+ "jest-cli": "^29.7.0"
},
"bin": {
"jest": "bin/jest.js"
@@ -3395,13 +3458,13 @@
}
},
"node_modules/jest-changed-files": {
- "version": "29.6.3",
- "resolved": "https://registry.npmjs.org/jest-changed-files/-/jest-changed-files-29.6.3.tgz",
- "integrity": "sha512-G5wDnElqLa4/c66ma5PG9eRjE342lIbF6SUnTJi26C3J28Fv2TVY2rOyKB9YGbSA5ogwevgmxc4j4aVjrEK6Yg==",
+ "version": "29.7.0",
+ "resolved": "https://registry.npmjs.org/jest-changed-files/-/jest-changed-files-29.7.0.tgz",
+ "integrity": "sha512-fEArFiwf1BpQ+4bXSprcDc3/x4HSzL4al2tozwVpDFpsxALjLYdyiIK4e5Vz66GQJIbXJ82+35PtysofptNX2w==",
"dev": true,
"dependencies": {
"execa": "^5.0.0",
- "jest-util": "^29.6.3",
+ "jest-util": "^29.7.0",
"p-limit": "^3.1.0"
},
"engines": {
@@ -3409,28 +3472,28 @@
}
},
"node_modules/jest-circus": {
- "version": "29.6.4",
- "resolved": "https://registry.npmjs.org/jest-circus/-/jest-circus-29.6.4.tgz",
- "integrity": "sha512-YXNrRyntVUgDfZbjXWBMPslX1mQ8MrSG0oM/Y06j9EYubODIyHWP8hMUbjbZ19M3M+zamqEur7O80HODwACoJw==",
+ "version": "29.7.0",
+ "resolved": "https://registry.npmjs.org/jest-circus/-/jest-circus-29.7.0.tgz",
+ "integrity": "sha512-3E1nCMgipcTkCocFwM90XXQab9bS+GMsjdpmPrlelaxwD93Ad8iVEjX/vvHPdLPnFf+L40u+5+iutRdA1N9myw==",
"dev": true,
"dependencies": {
- "@jest/environment": "^29.6.4",
- "@jest/expect": "^29.6.4",
- "@jest/test-result": "^29.6.4",
+ "@jest/environment": "^29.7.0",
+ "@jest/expect": "^29.7.0",
+ "@jest/test-result": "^29.7.0",
"@jest/types": "^29.6.3",
"@types/node": "*",
"chalk": "^4.0.0",
"co": "^4.6.0",
"dedent": "^1.0.0",
"is-generator-fn": "^2.0.0",
- "jest-each": "^29.6.3",
- "jest-matcher-utils": "^29.6.4",
- "jest-message-util": "^29.6.3",
- "jest-runtime": "^29.6.4",
- "jest-snapshot": "^29.6.4",
- "jest-util": "^29.6.3",
+ "jest-each": "^29.7.0",
+ "jest-matcher-utils": "^29.7.0",
+ "jest-message-util": "^29.7.0",
+ "jest-runtime": "^29.7.0",
+ "jest-snapshot": "^29.7.0",
+ "jest-util": "^29.7.0",
"p-limit": "^3.1.0",
- "pretty-format": "^29.6.3",
+ "pretty-format": "^29.7.0",
"pure-rand": "^6.0.0",
"slash": "^3.0.0",
"stack-utils": "^2.0.3"
@@ -3489,22 +3552,21 @@
"dev": true
},
"node_modules/jest-cli": {
- "version": "29.6.4",
- "resolved": "https://registry.npmjs.org/jest-cli/-/jest-cli-29.6.4.tgz",
- "integrity": "sha512-+uMCQ7oizMmh8ZwRfZzKIEszFY9ksjjEQnTEMTaL7fYiL3Kw4XhqT9bYh+A4DQKUb67hZn2KbtEnDuHvcgK4pQ==",
+ "version": "29.7.0",
+ "resolved": "https://registry.npmjs.org/jest-cli/-/jest-cli-29.7.0.tgz",
+ "integrity": "sha512-OVVobw2IubN/GSYsxETi+gOe7Ka59EFMR/twOU3Jb2GnKKeMGJB5SGUUrEz3SFVmJASUdZUzy83sLNNQ2gZslg==",
"dev": true,
"dependencies": {
- "@jest/core": "^29.6.4",
- "@jest/test-result": "^29.6.4",
+ "@jest/core": "^29.7.0",
+ "@jest/test-result": "^29.7.0",
"@jest/types": "^29.6.3",
"chalk": "^4.0.0",
+ "create-jest": "^29.7.0",
"exit": "^0.1.2",
- "graceful-fs": "^4.2.9",
"import-local": "^3.0.2",
- "jest-config": "^29.6.4",
- "jest-util": "^29.6.3",
- "jest-validate": "^29.6.3",
- "prompts": "^2.0.1",
+ "jest-config": "^29.7.0",
+ "jest-util": "^29.7.0",
+ "jest-validate": "^29.7.0",
"yargs": "^17.3.1"
},
"bin": {
@@ -3572,31 +3634,31 @@
"dev": true
},
"node_modules/jest-config": {
- "version": "29.6.4",
- "resolved": "https://registry.npmjs.org/jest-config/-/jest-config-29.6.4.tgz",
- "integrity": "sha512-JWohr3i9m2cVpBumQFv2akMEnFEPVOh+9L2xIBJhJ0zOaci2ZXuKJj0tgMKQCBZAKA09H049IR4HVS/43Qb19A==",
+ "version": "29.7.0",
+ "resolved": "https://registry.npmjs.org/jest-config/-/jest-config-29.7.0.tgz",
+ "integrity": "sha512-uXbpfeQ7R6TZBqI3/TxCU4q4ttk3u0PJeC+E0zbfSoSjq6bJ7buBPxzQPL0ifrkY4DNu4JUdk0ImlBUYi840eQ==",
"dev": true,
"dependencies": {
"@babel/core": "^7.11.6",
- "@jest/test-sequencer": "^29.6.4",
+ "@jest/test-sequencer": "^29.7.0",
"@jest/types": "^29.6.3",
- "babel-jest": "^29.6.4",
+ "babel-jest": "^29.7.0",
"chalk": "^4.0.0",
"ci-info": "^3.2.0",
"deepmerge": "^4.2.2",
"glob": "^7.1.3",
"graceful-fs": "^4.2.9",
- "jest-circus": "^29.6.4",
- "jest-environment-node": "^29.6.4",
+ "jest-circus": "^29.7.0",
+ "jest-environment-node": "^29.7.0",
"jest-get-type": "^29.6.3",
"jest-regex-util": "^29.6.3",
- "jest-resolve": "^29.6.4",
- "jest-runner": "^29.6.4",
- "jest-util": "^29.6.3",
- "jest-validate": "^29.6.3",
+ "jest-resolve": "^29.7.0",
+ "jest-runner": "^29.7.0",
+ "jest-util": "^29.7.0",
+ "jest-validate": "^29.7.0",
"micromatch": "^4.0.4",
"parse-json": "^5.2.0",
- "pretty-format": "^29.6.3",
+ "pretty-format": "^29.7.0",
"slash": "^3.0.0",
"strip-json-comments": "^3.1.1"
},
@@ -3708,15 +3770,15 @@
}
},
"node_modules/jest-diff": {
- "version": "29.6.4",
- "resolved": "https://registry.npmjs.org/jest-diff/-/jest-diff-29.6.4.tgz",
- "integrity": "sha512-9F48UxR9e4XOEZvoUXEHSWY4qC4zERJaOfrbBg9JpbJOO43R1vN76REt/aMGZoY6GD5g84nnJiBIVlscegefpw==",
+ "version": "29.7.0",
+ "resolved": "https://registry.npmjs.org/jest-diff/-/jest-diff-29.7.0.tgz",
+ "integrity": "sha512-LMIgiIrhigmPrs03JHpxUh2yISK3vLFPkAodPeo0+BuF7wA2FoQbkEg1u8gBYBThncu7e1oEDUfIXVuTqLRUjw==",
"dev": true,
"dependencies": {
"chalk": "^4.0.0",
"diff-sequences": "^29.6.3",
"jest-get-type": "^29.6.3",
- "pretty-format": "^29.6.3"
+ "pretty-format": "^29.7.0"
},
"engines": {
"node": "^14.15.0 || ^16.10.0 || >=18.0.0"
@@ -3772,9 +3834,9 @@
"dev": true
},
"node_modules/jest-docblock": {
- "version": "29.6.3",
- "resolved": "https://registry.npmjs.org/jest-docblock/-/jest-docblock-29.6.3.tgz",
- "integrity": "sha512-2+H+GOTQBEm2+qFSQ7Ma+BvyV+waiIFxmZF5LdpBsAEjWX8QYjSCa4FrkIYtbfXUJJJnFCYrOtt6TZ+IAiTjBQ==",
+ "version": "29.7.0",
+ "resolved": "https://registry.npmjs.org/jest-docblock/-/jest-docblock-29.7.0.tgz",
+ "integrity": "sha512-q617Auw3A612guyaFgsbFeYpNP5t2aoUNLwBUbc/0kD1R4t9ixDbyFTHd1nok4epoVFpr7PmeWHrhvuV3XaJ4g==",
"dev": true,
"dependencies": {
"detect-newline": "^3.0.0"
@@ -3784,16 +3846,16 @@
}
},
"node_modules/jest-each": {
- "version": "29.6.3",
- "resolved": "https://registry.npmjs.org/jest-each/-/jest-each-29.6.3.tgz",
- "integrity": "sha512-KoXfJ42k8cqbkfshW7sSHcdfnv5agDdHCPA87ZBdmHP+zJstTJc0ttQaJ/x7zK6noAL76hOuTIJ6ZkQRS5dcyg==",
+ "version": "29.7.0",
+ "resolved": "https://registry.npmjs.org/jest-each/-/jest-each-29.7.0.tgz",
+ "integrity": "sha512-gns+Er14+ZrEoC5fhOfYCY1LOHHr0TI+rQUHZS8Ttw2l7gl+80eHc/gFf2Ktkw0+SIACDTeWvpFcv3B04VembQ==",
"dev": true,
"dependencies": {
"@jest/types": "^29.6.3",
"chalk": "^4.0.0",
"jest-get-type": "^29.6.3",
- "jest-util": "^29.6.3",
- "pretty-format": "^29.6.3"
+ "jest-util": "^29.7.0",
+ "pretty-format": "^29.7.0"
},
"engines": {
"node": "^14.15.0 || ^16.10.0 || >=18.0.0"
@@ -3849,17 +3911,17 @@
"dev": true
},
"node_modules/jest-environment-node": {
- "version": "29.6.4",
- "resolved": "https://registry.npmjs.org/jest-environment-node/-/jest-environment-node-29.6.4.tgz",
- "integrity": "sha512-i7SbpH2dEIFGNmxGCpSc2w9cA4qVD+wfvg2ZnfQ7XVrKL0NA5uDVBIiGH8SR4F0dKEv/0qI5r+aDomDf04DpEQ==",
+ "version": "29.7.0",
+ "resolved": "https://registry.npmjs.org/jest-environment-node/-/jest-environment-node-29.7.0.tgz",
+ "integrity": "sha512-DOSwCRqXirTOyheM+4d5YZOrWcdu0LNZ87ewUoywbcb2XR4wKgqiG8vNeYwhjFMbEkfju7wx2GYH0P2gevGvFw==",
"dev": true,
"dependencies": {
- "@jest/environment": "^29.6.4",
- "@jest/fake-timers": "^29.6.4",
+ "@jest/environment": "^29.7.0",
+ "@jest/fake-timers": "^29.7.0",
"@jest/types": "^29.6.3",
"@types/node": "*",
- "jest-mock": "^29.6.3",
- "jest-util": "^29.6.3"
+ "jest-mock": "^29.7.0",
+ "jest-util": "^29.7.0"
},
"engines": {
"node": "^14.15.0 || ^16.10.0 || >=18.0.0"
@@ -3875,9 +3937,9 @@
}
},
"node_modules/jest-haste-map": {
- "version": "29.6.4",
- "resolved": "https://registry.npmjs.org/jest-haste-map/-/jest-haste-map-29.6.4.tgz",
- "integrity": "sha512-12Ad+VNTDHxKf7k+M65sviyynRoZYuL1/GTuhEVb8RYsNSNln71nANRb/faSyWvx0j+gHcivChXHIoMJrGYjog==",
+ "version": "29.7.0",
+ "resolved": "https://registry.npmjs.org/jest-haste-map/-/jest-haste-map-29.7.0.tgz",
+ "integrity": "sha512-fP8u2pyfqx0K1rGn1R9pyE0/KTn+G7PxktWidOBTqFPLYX0b9ksaMFkhK5vrS3DVun09pckLdlx90QthlW7AmA==",
"dev": true,
"dependencies": {
"@jest/types": "^29.6.3",
@@ -3887,8 +3949,8 @@
"fb-watchman": "^2.0.0",
"graceful-fs": "^4.2.9",
"jest-regex-util": "^29.6.3",
- "jest-util": "^29.6.3",
- "jest-worker": "^29.6.4",
+ "jest-util": "^29.7.0",
+ "jest-worker": "^29.7.0",
"micromatch": "^4.0.4",
"walker": "^1.0.8"
},
@@ -3900,28 +3962,28 @@
}
},
"node_modules/jest-leak-detector": {
- "version": "29.6.3",
- "resolved": "https://registry.npmjs.org/jest-leak-detector/-/jest-leak-detector-29.6.3.tgz",
- "integrity": "sha512-0kfbESIHXYdhAdpLsW7xdwmYhLf1BRu4AA118/OxFm0Ho1b2RcTmO4oF6aAMaxpxdxnJ3zve2rgwzNBD4Zbm7Q==",
+ "version": "29.7.0",
+ "resolved": "https://registry.npmjs.org/jest-leak-detector/-/jest-leak-detector-29.7.0.tgz",
+ "integrity": "sha512-kYA8IJcSYtST2BY9I+SMC32nDpBT3J2NvWJx8+JCuCdl/CR1I4EKUJROiP8XtCcxqgTTBGJNdbB1A8XRKbTetw==",
"dev": true,
"dependencies": {
"jest-get-type": "^29.6.3",
- "pretty-format": "^29.6.3"
+ "pretty-format": "^29.7.0"
},
"engines": {
"node": "^14.15.0 || ^16.10.0 || >=18.0.0"
}
},
"node_modules/jest-matcher-utils": {
- "version": "29.6.4",
- "resolved": "https://registry.npmjs.org/jest-matcher-utils/-/jest-matcher-utils-29.6.4.tgz",
- "integrity": "sha512-KSzwyzGvK4HcfnserYqJHYi7sZVqdREJ9DMPAKVbS98JsIAvumihaNUbjrWw0St7p9IY7A9UskCW5MYlGmBQFQ==",
+ "version": "29.7.0",
+ "resolved": "https://registry.npmjs.org/jest-matcher-utils/-/jest-matcher-utils-29.7.0.tgz",
+ "integrity": "sha512-sBkD+Xi9DtcChsI3L3u0+N0opgPYnCRPtGcQYrgXmR+hmt/fYfWAL0xRXYU8eWOdfuLgBe0YCW3AFtnRLagq/g==",
"dev": true,
"dependencies": {
"chalk": "^4.0.0",
- "jest-diff": "^29.6.4",
+ "jest-diff": "^29.7.0",
"jest-get-type": "^29.6.3",
- "pretty-format": "^29.6.3"
+ "pretty-format": "^29.7.0"
},
"engines": {
"node": "^14.15.0 || ^16.10.0 || >=18.0.0"
@@ -3977,9 +4039,9 @@
"dev": true
},
"node_modules/jest-message-util": {
- "version": "29.6.3",
- "resolved": "https://registry.npmjs.org/jest-message-util/-/jest-message-util-29.6.3.tgz",
- "integrity": "sha512-FtzaEEHzjDpQp51HX4UMkPZjy46ati4T5pEMyM6Ik48ztu4T9LQplZ6OsimHx7EuM9dfEh5HJa6D3trEftu3dA==",
+ "version": "29.7.0",
+ "resolved": "https://registry.npmjs.org/jest-message-util/-/jest-message-util-29.7.0.tgz",
+ "integrity": "sha512-GBEV4GRADeP+qtB2+6u61stea8mGcOT4mCtrYISZwfu9/ISHFJ/5zOMXYbpBE9RsS5+Gb63DW4FgmnKJ79Kf6w==",
"dev": true,
"dependencies": {
"@babel/code-frame": "^7.12.13",
@@ -3988,7 +4050,7 @@
"chalk": "^4.0.0",
"graceful-fs": "^4.2.9",
"micromatch": "^4.0.4",
- "pretty-format": "^29.6.3",
+ "pretty-format": "^29.7.0",
"slash": "^3.0.0",
"stack-utils": "^2.0.3"
},
@@ -4046,14 +4108,14 @@
"dev": true
},
"node_modules/jest-mock": {
- "version": "29.6.3",
- "resolved": "https://registry.npmjs.org/jest-mock/-/jest-mock-29.6.3.tgz",
- "integrity": "sha512-Z7Gs/mOyTSR4yPsaZ72a/MtuK6RnC3JYqWONe48oLaoEcYwEDxqvbXz85G4SJrm2Z5Ar9zp6MiHF4AlFlRM4Pg==",
+ "version": "29.7.0",
+ "resolved": "https://registry.npmjs.org/jest-mock/-/jest-mock-29.7.0.tgz",
+ "integrity": "sha512-ITOMZn+UkYS4ZFh83xYAOzWStloNzJFO2s8DWrE4lhtGD+AorgnbkiKERe4wQVBydIGPx059g6riW5Btp6Llnw==",
"dev": true,
"dependencies": {
"@jest/types": "^29.6.3",
"@types/node": "*",
- "jest-util": "^29.6.3"
+ "jest-util": "^29.7.0"
},
"engines": {
"node": "^14.15.0 || ^16.10.0 || >=18.0.0"
@@ -4086,17 +4148,17 @@
}
},
"node_modules/jest-resolve": {
- "version": "29.6.4",
- "resolved": "https://registry.npmjs.org/jest-resolve/-/jest-resolve-29.6.4.tgz",
- "integrity": "sha512-fPRq+0vcxsuGlG0O3gyoqGTAxasagOxEuyoxHeyxaZbc9QNek0AmJWSkhjlMG+mTsj+8knc/mWb3fXlRNVih7Q==",
+ "version": "29.7.0",
+ "resolved": "https://registry.npmjs.org/jest-resolve/-/jest-resolve-29.7.0.tgz",
+ "integrity": "sha512-IOVhZSrg+UvVAshDSDtHyFCCBUl/Q3AAJv8iZ6ZjnZ74xzvwuzLXid9IIIPgTnY62SJjfuupMKZsZQRsCvxEgA==",
"dev": true,
"dependencies": {
"chalk": "^4.0.0",
"graceful-fs": "^4.2.9",
- "jest-haste-map": "^29.6.4",
+ "jest-haste-map": "^29.7.0",
"jest-pnp-resolver": "^1.2.2",
- "jest-util": "^29.6.3",
- "jest-validate": "^29.6.3",
+ "jest-util": "^29.7.0",
+ "jest-validate": "^29.7.0",
"resolve": "^1.20.0",
"resolve.exports": "^2.0.0",
"slash": "^3.0.0"
@@ -4106,13 +4168,13 @@
}
},
"node_modules/jest-resolve-dependencies": {
- "version": "29.6.4",
- "resolved": "https://registry.npmjs.org/jest-resolve-dependencies/-/jest-resolve-dependencies-29.6.4.tgz",
- "integrity": "sha512-7+6eAmr1ZBF3vOAJVsfLj1QdqeXG+WYhidfLHBRZqGN24MFRIiKG20ItpLw2qRAsW/D2ZUUmCNf6irUr/v6KHA==",
+ "version": "29.7.0",
+ "resolved": "https://registry.npmjs.org/jest-resolve-dependencies/-/jest-resolve-dependencies-29.7.0.tgz",
+ "integrity": "sha512-un0zD/6qxJ+S0et7WxeI3H5XSe9lTBBR7bOHCHXkKR6luG5mwDDlIzVQ0V5cZCuoTgEdcdwzTghYkTWfubi+nA==",
"dev": true,
"dependencies": {
"jest-regex-util": "^29.6.3",
- "jest-snapshot": "^29.6.4"
+ "jest-snapshot": "^29.7.0"
},
"engines": {
"node": "^14.15.0 || ^16.10.0 || >=18.0.0"
@@ -4168,30 +4230,30 @@
"dev": true
},
"node_modules/jest-runner": {
- "version": "29.6.4",
- "resolved": "https://registry.npmjs.org/jest-runner/-/jest-runner-29.6.4.tgz",
- "integrity": "sha512-SDaLrMmtVlQYDuG0iSPYLycG8P9jLI+fRm8AF/xPKhYDB2g6xDWjXBrR5M8gEWsK6KVFlebpZ4QsrxdyIX1Jaw==",
+ "version": "29.7.0",
+ "resolved": "https://registry.npmjs.org/jest-runner/-/jest-runner-29.7.0.tgz",
+ "integrity": "sha512-fsc4N6cPCAahybGBfTRcq5wFR6fpLznMg47sY5aDpsoejOcVYFb07AHuSnR0liMcPTgBsA3ZJL6kFOjPdoNipQ==",
"dev": true,
"dependencies": {
- "@jest/console": "^29.6.4",
- "@jest/environment": "^29.6.4",
- "@jest/test-result": "^29.6.4",
- "@jest/transform": "^29.6.4",
+ "@jest/console": "^29.7.0",
+ "@jest/environment": "^29.7.0",
+ "@jest/test-result": "^29.7.0",
+ "@jest/transform": "^29.7.0",
"@jest/types": "^29.6.3",
"@types/node": "*",
"chalk": "^4.0.0",
"emittery": "^0.13.1",
"graceful-fs": "^4.2.9",
- "jest-docblock": "^29.6.3",
- "jest-environment-node": "^29.6.4",
- "jest-haste-map": "^29.6.4",
- "jest-leak-detector": "^29.6.3",
- "jest-message-util": "^29.6.3",
- "jest-resolve": "^29.6.4",
- "jest-runtime": "^29.6.4",
- "jest-util": "^29.6.3",
- "jest-watcher": "^29.6.4",
- "jest-worker": "^29.6.4",
+ "jest-docblock": "^29.7.0",
+ "jest-environment-node": "^29.7.0",
+ "jest-haste-map": "^29.7.0",
+ "jest-leak-detector": "^29.7.0",
+ "jest-message-util": "^29.7.0",
+ "jest-resolve": "^29.7.0",
+ "jest-runtime": "^29.7.0",
+ "jest-util": "^29.7.0",
+ "jest-watcher": "^29.7.0",
+ "jest-worker": "^29.7.0",
"p-limit": "^3.1.0",
"source-map-support": "0.5.13"
},
@@ -4249,17 +4311,17 @@
"dev": true
},
"node_modules/jest-runtime": {
- "version": "29.6.4",
- "resolved": "https://registry.npmjs.org/jest-runtime/-/jest-runtime-29.6.4.tgz",
- "integrity": "sha512-s/QxMBLvmwLdchKEjcLfwzP7h+jsHvNEtxGP5P+Fl1FMaJX2jMiIqe4rJw4tFprzCwuSvVUo9bn0uj4gNRXsbA==",
+ "version": "29.7.0",
+ "resolved": "https://registry.npmjs.org/jest-runtime/-/jest-runtime-29.7.0.tgz",
+ "integrity": "sha512-gUnLjgwdGqW7B4LvOIkbKs9WGbn+QLqRQQ9juC6HndeDiezIwhDP+mhMwHWCEcfQ5RUXa6OPnFF8BJh5xegwwQ==",
"dev": true,
"dependencies": {
- "@jest/environment": "^29.6.4",
- "@jest/fake-timers": "^29.6.4",
- "@jest/globals": "^29.6.4",
+ "@jest/environment": "^29.7.0",
+ "@jest/fake-timers": "^29.7.0",
+ "@jest/globals": "^29.7.0",
"@jest/source-map": "^29.6.3",
- "@jest/test-result": "^29.6.4",
- "@jest/transform": "^29.6.4",
+ "@jest/test-result": "^29.7.0",
+ "@jest/transform": "^29.7.0",
"@jest/types": "^29.6.3",
"@types/node": "*",
"chalk": "^4.0.0",
@@ -4267,13 +4329,13 @@
"collect-v8-coverage": "^1.0.0",
"glob": "^7.1.3",
"graceful-fs": "^4.2.9",
- "jest-haste-map": "^29.6.4",
- "jest-message-util": "^29.6.3",
- "jest-mock": "^29.6.3",
+ "jest-haste-map": "^29.7.0",
+ "jest-message-util": "^29.7.0",
+ "jest-mock": "^29.7.0",
"jest-regex-util": "^29.6.3",
- "jest-resolve": "^29.6.4",
- "jest-snapshot": "^29.6.4",
- "jest-util": "^29.6.3",
+ "jest-resolve": "^29.7.0",
+ "jest-snapshot": "^29.7.0",
+ "jest-util": "^29.7.0",
"slash": "^3.0.0",
"strip-bom": "^4.0.0"
},
@@ -4373,9 +4435,9 @@
}
},
"node_modules/jest-snapshot": {
- "version": "29.6.4",
- "resolved": "https://registry.npmjs.org/jest-snapshot/-/jest-snapshot-29.6.4.tgz",
- "integrity": "sha512-VC1N8ED7+4uboUKGIDsbvNAZb6LakgIPgAF4RSpF13dN6YaMokfRqO+BaqK4zIh6X3JffgwbzuGqDEjHm/MrvA==",
+ "version": "29.7.0",
+ "resolved": "https://registry.npmjs.org/jest-snapshot/-/jest-snapshot-29.7.0.tgz",
+ "integrity": "sha512-Rm0BMWtxBcioHr1/OX5YCP8Uov4riHvKPknOGs804Zg9JGZgmIBkbtlxJC/7Z4msKYVbIJtfU+tKb8xlYNfdkw==",
"dev": true,
"dependencies": {
"@babel/core": "^7.11.6",
@@ -4383,20 +4445,20 @@
"@babel/plugin-syntax-jsx": "^7.7.2",
"@babel/plugin-syntax-typescript": "^7.7.2",
"@babel/types": "^7.3.3",
- "@jest/expect-utils": "^29.6.4",
- "@jest/transform": "^29.6.4",
+ "@jest/expect-utils": "^29.7.0",
+ "@jest/transform": "^29.7.0",
"@jest/types": "^29.6.3",
"babel-preset-current-node-syntax": "^1.0.0",
"chalk": "^4.0.0",
- "expect": "^29.6.4",
+ "expect": "^29.7.0",
"graceful-fs": "^4.2.9",
- "jest-diff": "^29.6.4",
+ "jest-diff": "^29.7.0",
"jest-get-type": "^29.6.3",
- "jest-matcher-utils": "^29.6.4",
- "jest-message-util": "^29.6.3",
- "jest-util": "^29.6.3",
+ "jest-matcher-utils": "^29.7.0",
+ "jest-message-util": "^29.7.0",
+ "jest-util": "^29.7.0",
"natural-compare": "^1.4.0",
- "pretty-format": "^29.6.3",
+ "pretty-format": "^29.7.0",
"semver": "^7.5.3"
},
"engines": {
@@ -4453,9 +4515,9 @@
"dev": true
},
"node_modules/jest-util": {
- "version": "29.6.3",
- "resolved": "https://registry.npmjs.org/jest-util/-/jest-util-29.6.3.tgz",
- "integrity": "sha512-QUjna/xSy4B32fzcKTSz1w7YYzgiHrjjJjevdRf61HYk998R5vVMMNmrHESYZVDS5DSWs+1srPLPKxXPkeSDOA==",
+ "version": "29.7.0",
+ "resolved": "https://registry.npmjs.org/jest-util/-/jest-util-29.7.0.tgz",
+ "integrity": "sha512-z6EbKajIpqGKU56y5KBUgy1dt1ihhQJgWzUlZHArA/+X2ad7Cb5iF+AK1EWVL/Bo7Rz9uurpqw6SiBCefUbCGA==",
"dev": true,
"dependencies": {
"@jest/types": "^29.6.3",
@@ -4519,9 +4581,9 @@
"dev": true
},
"node_modules/jest-validate": {
- "version": "29.6.3",
- "resolved": "https://registry.npmjs.org/jest-validate/-/jest-validate-29.6.3.tgz",
- "integrity": "sha512-e7KWZcAIX+2W1o3cHfnqpGajdCs1jSM3DkXjGeLSNmCazv1EeI1ggTeK5wdZhF+7N+g44JI2Od3veojoaumlfg==",
+ "version": "29.7.0",
+ "resolved": "https://registry.npmjs.org/jest-validate/-/jest-validate-29.7.0.tgz",
+ "integrity": "sha512-ZB7wHqaRGVw/9hST/OuFUReG7M8vKeq0/J2egIGLdvjHCmYqGARhzXmtgi+gVeZ5uXFF219aOc3Ls2yLg27tkw==",
"dev": true,
"dependencies": {
"@jest/types": "^29.6.3",
@@ -4529,7 +4591,7 @@
"chalk": "^4.0.0",
"jest-get-type": "^29.6.3",
"leven": "^3.1.0",
- "pretty-format": "^29.6.3"
+ "pretty-format": "^29.7.0"
},
"engines": {
"node": "^14.15.0 || ^16.10.0 || >=18.0.0"
@@ -4597,18 +4659,18 @@
"dev": true
},
"node_modules/jest-watcher": {
- "version": "29.6.4",
- "resolved": "https://registry.npmjs.org/jest-watcher/-/jest-watcher-29.6.4.tgz",
- "integrity": "sha512-oqUWvx6+On04ShsT00Ir9T4/FvBeEh2M9PTubgITPxDa739p4hoQweWPRGyYeaojgT0xTpZKF0Y/rSY1UgMxvQ==",
+ "version": "29.7.0",
+ "resolved": "https://registry.npmjs.org/jest-watcher/-/jest-watcher-29.7.0.tgz",
+ "integrity": "sha512-49Fg7WXkU3Vl2h6LbLtMQ/HyB6rXSIX7SqvBLQmssRBGN9I0PNvPmAmCWSOY6SOvrjhI/F7/bGAv9RtnsPA03g==",
"dev": true,
"dependencies": {
- "@jest/test-result": "^29.6.4",
+ "@jest/test-result": "^29.7.0",
"@jest/types": "^29.6.3",
"@types/node": "*",
"ansi-escapes": "^4.2.1",
"chalk": "^4.0.0",
"emittery": "^0.13.1",
- "jest-util": "^29.6.3",
+ "jest-util": "^29.7.0",
"string-length": "^4.0.1"
},
"engines": {
@@ -4665,13 +4727,13 @@
"dev": true
},
"node_modules/jest-worker": {
- "version": "29.6.4",
- "resolved": "https://registry.npmjs.org/jest-worker/-/jest-worker-29.6.4.tgz",
- "integrity": "sha512-6dpvFV4WjcWbDVGgHTWo/aupl8/LbBx2NSKfiwqf79xC/yeJjKHT1+StcKy/2KTmW16hE68ccKVOtXf+WZGz7Q==",
+ "version": "29.7.0",
+ "resolved": "https://registry.npmjs.org/jest-worker/-/jest-worker-29.7.0.tgz",
+ "integrity": "sha512-eIz2msL/EzL9UFTFFx7jBTkeZfku0yUAyZZZmJ93H2TYEiroIx2PQjEXcwYtYl8zXCxb+PAmA2hLIt/6ZEkPHw==",
"dev": true,
"dependencies": {
"@types/node": "*",
- "jest-util": "^29.6.3",
+ "jest-util": "^29.7.0",
"merge-stream": "^2.0.0",
"supports-color": "^8.0.0"
},
@@ -4789,13 +4851,12 @@
"dev": true
},
"node_modules/linked-list-typed": {
- "version": "1.21.3",
- "resolved": "https://registry.npmjs.org/linked-list-typed/-/linked-list-typed-1.21.3.tgz",
- "integrity": "sha512-cyHvhIs+rSgqIgcq3weE4ng4WRtDLE3wPm0wa21p1G6gLrtcnRfwWbnOwe68sD7z3st6CRRyiyS2128g9YDeDA==",
+ "version": "1.3.3",
+ "resolved": "https://registry.npmjs.org/linked-list-typed/-/linked-list-typed-1.3.3.tgz",
+ "integrity": "sha512-mccqLmNbBG3xwT/nnFlO7vhgynQHzl+JOE7SOYlxeKaCJ5Nrh35w2gqCf9OV9f3TeouA2/CBwsViY01OFl52jA==",
"dev": true,
"dependencies": {
- "data-structure-typed": "^1.21.3",
- "zod": "^3.22.2"
+ "data-structure-typed": "^1.3.3"
}
},
"node_modules/loader-runner": {
@@ -4889,23 +4950,21 @@
}
},
"node_modules/max-heap-typed": {
- "version": "1.21.3",
- "resolved": "https://registry.npmjs.org/max-heap-typed/-/max-heap-typed-1.21.3.tgz",
- "integrity": "sha512-F8DbeN0gaVqbIPfBBcVsA+yqvZAyR5WWb9Wjw+N1zaTyikOUsfHbZO+xUQXyAP3fG7bSlS9vr/C1Gf2BE+FcxQ==",
+ "version": "1.3.3",
+ "resolved": "https://registry.npmjs.org/max-heap-typed/-/max-heap-typed-1.3.3.tgz",
+ "integrity": "sha512-yiMWyCcUa0aDWNEwE/7dlklphwTUvBrMITZQ3pH4sbrv8snpe+kO8M5EWWwPvLPaOiG1PKYSjH8pspE2xCCv6Q==",
"dev": true,
"dependencies": {
- "data-structure-typed": "^1.21.3",
- "zod": "^3.22.2"
+ "data-structure-typed": "^1.3.3"
}
},
"node_modules/max-priority-queue-typed": {
- "version": "1.21.3",
- "resolved": "https://registry.npmjs.org/max-priority-queue-typed/-/max-priority-queue-typed-1.21.3.tgz",
- "integrity": "sha512-IOclpEFpQyUDzH2Hp3JhX2TiHaGSeIDclBcUNpZoI/XNpOenkfuqzzV1QGG+BAz3dPD2vq/9TjVRRrHypPma6A==",
+ "version": "1.3.3",
+ "resolved": "https://registry.npmjs.org/max-priority-queue-typed/-/max-priority-queue-typed-1.3.3.tgz",
+ "integrity": "sha512-xriejx/vg+6ffJAZm+7PkR1KoMa5IHwuh7RxkDIUBeqhINaUhhz8c2BGAWwZx9Ug0XaGIgy8VzQik1G2B2rQnQ==",
"dev": true,
"dependencies": {
- "data-structure-typed": "^1.21.3",
- "zod": "^3.22.2"
+ "data-structure-typed": "^1.3.3"
}
},
"node_modules/merge-stream": {
@@ -4958,23 +5017,21 @@
}
},
"node_modules/min-heap-typed": {
- "version": "1.21.3",
- "resolved": "https://registry.npmjs.org/min-heap-typed/-/min-heap-typed-1.21.3.tgz",
- "integrity": "sha512-S43A9yI3tg22Ojnu1x1Amt0dU5LrqS19SOKKDyAtXnUzS5RMkZM/b5iw2nJ5mrEP2FJwjOyj+XLapSyXw9powA==",
+ "version": "1.3.3",
+ "resolved": "https://registry.npmjs.org/min-heap-typed/-/min-heap-typed-1.3.3.tgz",
+ "integrity": "sha512-/l+HTy3Gqf1NhhsmYVRm8wVx6QA/jgOFVBhb0YUY9g1szAnoopZJ2OOWUlbTrqaU+wyfOi7xqL+dFfootZrYcA==",
"dev": true,
"dependencies": {
- "data-structure-typed": "^1.21.3",
- "zod": "^3.22.2"
+ "data-structure-typed": "^1.3.3"
}
},
"node_modules/min-priority-queue-typed": {
- "version": "1.21.3",
- "resolved": "https://registry.npmjs.org/min-priority-queue-typed/-/min-priority-queue-typed-1.21.3.tgz",
- "integrity": "sha512-woyiLWvMaHJfBFziPSffy74Hk+80K23yEEG/QUDqS6hMbM+BUla7NhWFfqJOal0igMqgI9u73XMEnQAwrfR/2g==",
+ "version": "1.3.3",
+ "resolved": "https://registry.npmjs.org/min-priority-queue-typed/-/min-priority-queue-typed-1.3.3.tgz",
+ "integrity": "sha512-c7LDSu9wc1uEunDZjPhksBkD+iKQ9YUSanSZUqQ6qVitwFeHvzqhct4v2NteYbqhBAEFC6Jzlpty2g5rXe3CtQ==",
"dev": true,
"dependencies": {
- "data-structure-typed": "^1.21.3",
- "zod": "^3.22.2"
+ "data-structure-typed": "^1.3.3"
}
},
"node_modules/minimatch": {
@@ -5252,9 +5309,9 @@
}
},
"node_modules/pretty-format": {
- "version": "29.6.3",
- "resolved": "https://registry.npmjs.org/pretty-format/-/pretty-format-29.6.3.tgz",
- "integrity": "sha512-ZsBgjVhFAj5KeK+nHfF1305/By3lechHQSMWCTl8iHSbfOm2TN5nHEtFc/+W7fAyUeCs2n5iow72gld4gW0xDw==",
+ "version": "29.7.0",
+ "resolved": "https://registry.npmjs.org/pretty-format/-/pretty-format-29.7.0.tgz",
+ "integrity": "sha512-Pdlw/oPxN+aXdmM9R00JVC9WVFoCLTKJvDVLgmJ+qAffBMxsV85l/Lu7sNx4zSzPyoL2euImuEwHhOXdEgNFZQ==",
"dev": true,
"dependencies": {
"@jest/schemas": "^29.6.3",
@@ -5266,13 +5323,12 @@
}
},
"node_modules/priority-queue-typed": {
- "version": "1.21.3",
- "resolved": "https://registry.npmjs.org/priority-queue-typed/-/priority-queue-typed-1.21.3.tgz",
- "integrity": "sha512-YJSppKblM25t6L3kn/9MsgHsQi6Z3vvuoX6xWsA4Np69SMsAqMfsKrCO7oSYfEDZzW9LxeL/rZzjn0GeygraaQ==",
+ "version": "1.3.3",
+ "resolved": "https://registry.npmjs.org/priority-queue-typed/-/priority-queue-typed-1.3.3.tgz",
+ "integrity": "sha512-yv92rNbm3tD3ZNvZQyjEsotQMgGO4dIhhR0nGtP3gUv8D50Ci7Q6+WPfknb2i1G9EY9okr3o6gYtLLxc21LHpQ==",
"dev": true,
"dependencies": {
- "data-structure-typed": "^1.21.3",
- "zod": "^3.22.2"
+ "data-structure-typed": "^1.3.3"
}
},
"node_modules/prompts": {
@@ -5313,6 +5369,15 @@
}
]
},
+ "node_modules/queue-typed": {
+ "version": "1.3.3",
+ "resolved": "https://registry.npmjs.org/queue-typed/-/queue-typed-1.3.3.tgz",
+ "integrity": "sha512-i+RPjK5pc9mPgzJZ5hWmgUfU1ahQ1AcXR1teqX7cGKpOrqgQCosVXUbrTm04ddwTK83IWip4HS5pvoArRtoC7w==",
+ "dev": true,
+ "dependencies": {
+ "data-structure-typed": "^1.3.3"
+ }
+ },
"node_modules/randombytes": {
"version": "2.1.0",
"resolved": "https://registry.npmjs.org/randombytes/-/randombytes-2.1.0.tgz",
@@ -5368,9 +5433,9 @@
}
},
"node_modules/resolve": {
- "version": "1.22.4",
- "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.22.4.tgz",
- "integrity": "sha512-PXNdCiPqDqeUou+w1C2eTQbNfxKSuMxqTCuvlmmMsk1NWHL5fRrhY6Pl0qEYYc6+QqGClco1Qj8XnjPego4wfg==",
+ "version": "1.22.6",
+ "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.22.6.tgz",
+ "integrity": "sha512-njhxM7mV12JfufShqGy3Rz8j11RPdLy4xi15UurGJeoHLfJpVXKdh3ueuOqbYUcDZnffr6X739JBo5LzyahEsw==",
"dev": true,
"dependencies": {
"is-core-module": "^2.13.0",
@@ -5604,13 +5669,12 @@
}
},
"node_modules/singly-linked-list-typed": {
- "version": "1.21.3",
- "resolved": "https://registry.npmjs.org/singly-linked-list-typed/-/singly-linked-list-typed-1.21.3.tgz",
- "integrity": "sha512-gcCqO7Lc164qkiQXSs04fcDsSAc3aPsA+Hcz9zEFVbGHHaYEZW04wPwU67XnSHpVtSU8FnMlWVkPxJq7Xf2h6g==",
+ "version": "1.3.3",
+ "resolved": "https://registry.npmjs.org/singly-linked-list-typed/-/singly-linked-list-typed-1.3.3.tgz",
+ "integrity": "sha512-wlbm0pDRiFX0QuEmDTtskJ8x0Fay6+h/qKXjVBi3ux1ClU8dC+7URblZGW3tWnUyInHoNmj9RO4m+X54+xvklw==",
"dev": true,
"dependencies": {
- "data-structure-typed": "^1.21.3",
- "zod": "^3.22.2"
+ "data-structure-typed": "^1.3.3"
}
},
"node_modules/sisteransi": {
@@ -5654,13 +5718,12 @@
"dev": true
},
"node_modules/stack-typed": {
- "version": "1.21.3",
- "resolved": "https://registry.npmjs.org/stack-typed/-/stack-typed-1.21.3.tgz",
- "integrity": "sha512-wLqkd6jg7RuOsrs8LFvoFh1zAHLB2H2NLfxpB1tfpx46gm2eJHPFFY9gpk3DATDaOHDV87dpEXrM40tVT6ALrg==",
+ "version": "1.3.3",
+ "resolved": "https://registry.npmjs.org/stack-typed/-/stack-typed-1.3.3.tgz",
+ "integrity": "sha512-iLfmbhCYUSzK6WVsKdV7Tv++dRKmEs48YpJ50/gDPupg7dYYkb5noMT1OaarXaPTRS1WKZIWgczcAxiiL0pjPg==",
"dev": true,
"dependencies": {
- "data-structure-typed": "^1.21.3",
- "zod": "^3.22.2"
+ "data-structure-typed": "^1.3.3"
}
},
"node_modules/stack-utils": {
@@ -6064,23 +6127,21 @@
}
},
"node_modules/tree-multiset-typed": {
- "version": "1.21.3",
- "resolved": "https://registry.npmjs.org/tree-multiset-typed/-/tree-multiset-typed-1.21.3.tgz",
- "integrity": "sha512-iawtJsC3lj3w6CprTHA/V2XCDC6xUd39wJ1+A+tZb9zsiIGBSwvHVaFGGjU8+IXGsH0LOt3tUTrOgifWX5dEzA==",
+ "version": "1.3.3",
+ "resolved": "https://registry.npmjs.org/tree-multiset-typed/-/tree-multiset-typed-1.3.3.tgz",
+ "integrity": "sha512-IsvMymeguS/+UqX7j57Ah5gIWkEJIba4K+8MFacIHfnqriLqKUFPCy4msXqU9obGFhD6AOgiwcpxbKtx/3v9ww==",
"dev": true,
"dependencies": {
- "data-structure-typed": "^1.21.3",
- "zod": "^3.22.2"
+ "data-structure-typed": "^1.3.3"
}
},
"node_modules/trie-typed": {
- "version": "1.21.3",
- "resolved": "https://registry.npmjs.org/trie-typed/-/trie-typed-1.21.3.tgz",
- "integrity": "sha512-4ia0nlFhYmOromnrbGn4isLoyAYHftA7d0UAq77bC7ujro4Z5TWLEr7dEZ07m/vwvz55QeC+bzVKJyl04/QNrw==",
+ "version": "1.3.3",
+ "resolved": "https://registry.npmjs.org/trie-typed/-/trie-typed-1.3.3.tgz",
+ "integrity": "sha512-OdEfMXjDshD404TSPqXuroEk6iJYJJaKHuVgQdBLQHefOhtK09gm1/iUd33tplt1iEHKZ1LvqGVas8dhwGt/Gw==",
"dev": true,
"dependencies": {
- "data-structure-typed": "^1.21.3",
- "zod": "^3.22.2"
+ "data-structure-typed": "^1.3.3"
}
},
"node_modules/ts-jest": {
@@ -6336,13 +6397,12 @@
}
},
"node_modules/undirected-graph-typed": {
- "version": "1.21.3",
- "resolved": "https://registry.npmjs.org/undirected-graph-typed/-/undirected-graph-typed-1.21.3.tgz",
- "integrity": "sha512-tU02rCmLp68fTHLy3H7KSb0xzxxDkDDSwMiNavOxCiovv5mcgc026U/pRtHvAFaNtRFKcCA6ABtbUZqtrgErEA==",
+ "version": "1.3.3",
+ "resolved": "https://registry.npmjs.org/undirected-graph-typed/-/undirected-graph-typed-1.3.3.tgz",
+ "integrity": "sha512-Lgb3Qw3il08rad35V14HiuO47PbujZzrGvBbRzHuyzt0NuOQjGAajQkq+J8GE3lptgedQaKhzUWYFzmPV5aNYQ==",
"dev": true,
"dependencies": {
- "data-structure-typed": "^1.21.3",
- "zod": "^3.22.2"
+ "data-structure-typed": "^1.3.3"
}
},
"node_modules/update-browserslist-db": {
@@ -6834,15 +6894,6 @@
"funding": {
"url": "https://github.com/sponsors/sindresorhus"
}
- },
- "node_modules/zod": {
- "version": "3.22.2",
- "resolved": "https://registry.npmjs.org/zod/-/zod-3.22.2.tgz",
- "integrity": "sha512-wvWkphh5WQsJbVk1tbx1l1Ly4yg+XecD+Mq280uBGt9wa5BKSWf4Mhp6GmrkPixhMxmabYY7RbzlwVP32pbGCg==",
- "dev": true,
- "funding": {
- "url": "https://github.com/sponsors/colinhacks"
- }
}
}
}
diff --git a/package.json b/package.json
index 82323c2..2b6aeb3 100644
--- a/package.json
+++ b/package.json
@@ -1,6 +1,6 @@
{
"name": "data-structure-typed",
- "version": "1.3.1",
+ "version": "1.3.3",
"description": "Data Structures of Javascript & TypeScript. AVLTree, Binary Search Tree, Binary Tree, Tree Multiset, Graph, Heap, Priority Queue, Linked List.",
"main": "dist/index.js",
"module": "dist/index.js",
@@ -10,7 +10,7 @@
"build:browser": "webpack",
"build:docs": "typedoc --out docs ./src",
"test": "jest",
- "update:test-deps": "npm i avl-tree-typed binary-tree-typed bst-typed deque-typed directed-graph-typed doubly-linked-list-typed graph-typed heap-typed linked-list-typed max-heap-typed max-priority-queue-typed min-heap-typed min-priority-queue-typed priority-queue-typed singly-linked-list-typed stack-typed tree-multiset-typed trie-typed undirected-graph-typed --save-dev",
+ "update:test-deps": "npm i avl-tree-typed binary-tree-typed bst-typed deque-typed directed-graph-typed doubly-linked-list-typed graph-typed heap-typed linked-list-typed max-heap-typed max-priority-queue-typed min-heap-typed min-priority-queue-typed priority-queue-typed singly-linked-list-typed stack-typed tree-multiset-typed trie-typed undirected-graph-typed queue-typed --save-dev",
"deps:check": "dependency-cruiser src",
"build:publish": "npm run test && npm run build && npm run build:docs && npm publish"
},
@@ -134,31 +134,32 @@
"devDependencies": {
"@types/jest": "^29.5.3",
"@types/node": "^20.4.9",
- "avl-tree-typed": "^1.21.3",
- "binary-tree-typed": "^1.21.3",
- "bst-typed": "^1.21.3",
+ "avl-tree-typed": "^1.3.3",
+ "binary-tree-typed": "^1.3.3",
+ "bst-typed": "^1.3.3",
"dependency-cruiser": "^13.1.2",
- "deque-typed": "^1.21.3",
- "directed-graph-typed": "^1.21.3",
- "doubly-linked-list-typed": "^1.21.3",
- "graph-typed": "^1.21.3",
- "heap-typed": "^1.21.3",
+ "deque-typed": "^1.3.3",
+ "directed-graph-typed": "^1.3.3",
+ "doubly-linked-list-typed": "^1.3.3",
+ "graph-typed": "^1.3.3",
+ "heap-typed": "^1.3.3",
"jest": "^29.6.2",
- "linked-list-typed": "^1.21.3",
- "max-heap-typed": "^1.21.3",
- "max-priority-queue-typed": "^1.21.3",
- "min-heap-typed": "^1.21.3",
- "min-priority-queue-typed": "^1.21.3",
- "priority-queue-typed": "^1.21.3",
- "singly-linked-list-typed": "^1.21.3",
- "stack-typed": "^1.21.3",
- "tree-multiset-typed": "^1.21.3",
- "trie-typed": "^1.21.3",
+ "linked-list-typed": "^1.3.3",
+ "max-heap-typed": "^1.3.3",
+ "max-priority-queue-typed": "^1.3.3",
+ "min-heap-typed": "^1.3.3",
+ "min-priority-queue-typed": "^1.3.3",
+ "priority-queue-typed": "^1.3.3",
+ "queue-typed": "^1.3.3",
+ "singly-linked-list-typed": "^1.3.3",
+ "stack-typed": "^1.3.3",
+ "tree-multiset-typed": "^1.3.3",
+ "trie-typed": "^1.3.3",
"ts-jest": "^29.1.1",
"ts-loader": "^9.4.4",
"typedoc": "^0.24.8",
"typescript": "^4.9.5",
- "undirected-graph-typed": "^1.21.3",
+ "undirected-graph-typed": "^1.3.3",
"webpack": "^5.88.2",
"webpack-cli": "^5.1.4"
}
diff --git a/src/data-structures/linked-list/doubly-linked-list.ts b/src/data-structures/linked-list/doubly-linked-list.ts
index 661a4e4..8462f12 100644
--- a/src/data-structures/linked-list/doubly-linked-list.ts
+++ b/src/data-structures/linked-list/doubly-linked-list.ts
@@ -49,7 +49,7 @@ export class DoublyLinkedListNode {
}
}
-export class DoublyLinkedList {
+export class DoublyLinkedList {
/**
* The constructor initializes the linked list with an empty head, tail, and length.
@@ -122,8 +122,8 @@ export class DoublyLinkedList {
* @returns The method is returning the value of the removed node (removedNode.val) if the list is not empty. If the
* list is empty, it returns null.
*/
- pop(): T | null {
- if (!this.tail) return null;
+ pop(): T | undefined {
+ if (!this.tail) return undefined;
const removedNode = this.tail;
if (this.head === this.tail) {
this.head = null;
@@ -141,8 +141,8 @@ export class DoublyLinkedList {
* @returns The method `shift()` returns the value of the node that is removed from the beginning of the doubly linked
* list.
*/
- shift(): T | null {
- if (!this.head) return null;
+ shift(): T | undefined {
+ if (!this.head) return undefined;
const removedNode = this.head;
if (this.head === this.tail) {
this.head = null;
@@ -180,8 +180,8 @@ export class DoublyLinkedList {
* @returns The method is returning the value at the specified index in the linked list. If the index is out of bounds
* or the linked list is empty, it will return null.
*/
- getAt(index: number): T | null {
- if (index < 0 || index >= this.length) return null;
+ getAt(index: number): T | undefined {
+ if (index < 0 || index >= this.length) return undefined;
let current = this.head;
for (let i = 0; i < index; i++) {
current = current!.next;
@@ -264,8 +264,8 @@ export class DoublyLinkedList {
* @returns The method `deleteAt` returns the value of the node that was deleted, or `null` if the index is out of
* bounds.
*/
- deleteAt(index: number): T | null {
- if (index < 0 || index >= this.length) return null;
+ deleteAt(index: number): T | undefined {
+ if (index < 0 || index >= this.length) return undefined;
if (index === 0) return this.shift();
if (index === this.length - 1) return this.pop();
@@ -280,6 +280,7 @@ export class DoublyLinkedList {
delete(valOrNode: T): boolean;
delete(valOrNode: DoublyLinkedListNode): boolean;
+
/**
* The `delete` function removes a node from a doubly linked list based on either the node itself or its value.
* @param {T | DoublyLinkedListNode} valOrNode - The `valOrNode` parameter can accept either a value of type `T` or
@@ -495,6 +496,7 @@ export class DoublyLinkedList {
insertAfter(existingValueOrNode: T, newValue: T): boolean;
insertAfter(existingValueOrNode: DoublyLinkedListNode, newValue: T): boolean;
+
/**
* The `insertAfter` function inserts a new node with a given value after an existing node in a doubly linked list.
* @param {T | DoublyLinkedListNode} existingValueOrNode - The existing value or node in the doubly linked list
@@ -533,6 +535,7 @@ export class DoublyLinkedList {
insertBefore(existingValueOrNode: T, newValue: T): boolean;
insertBefore(existingValueOrNode: DoublyLinkedListNode, newValue: T): boolean;
+
/**
* The `insertBefore` function inserts a new value before an existing value or node in a doubly linked list.
* @param {T | DoublyLinkedListNode} existingValueOrNode - The existing value or node in the doubly linked list
diff --git a/src/data-structures/linked-list/singly-linked-list.ts b/src/data-structures/linked-list/singly-linked-list.ts
index fa4f651..ecc37cd 100644
--- a/src/data-structures/linked-list/singly-linked-list.ts
+++ b/src/data-structures/linked-list/singly-linked-list.ts
@@ -173,8 +173,8 @@ export class SinglyLinkedList {
* @returns The method `getAt(index: number): T | null` returns the value at the specified index in the linked list, or
* `null` if the index is out of bounds.
*/
- getAt(index: number): T | null {
- if (index < 0 || index >= this.length) return null;
+ getAt(index: number): T | undefined {
+ if (index < 0 || index >= this.length) return undefined;
let current = this.head;
for (let i = 0; i < index; i++) {
current = current!.next;
@@ -218,6 +218,7 @@ export class SinglyLinkedList {
delete(valueOrNode: T): boolean;
delete(valueOrNode: SinglyLinkedListNode): boolean;
+
/**
* The delete function removes a node with a specific value from a singly linked list.
* @param {T | SinglyLinkedListNode} valueOrNode - The `valueOrNode` parameter can accept either a value of type `T`
@@ -399,6 +400,7 @@ export class SinglyLinkedList {
insertBefore(existingValue: T, newValue: T): boolean
insertBefore(existingValue: SinglyLinkedListNode, newValue: T): boolean
+
/**
* The `insertBefore` function inserts a new value before an existing value in a singly linked list.
* @param {T | SinglyLinkedListNode} existingValueOrNode - The existing value or node that you want to insert the
@@ -438,6 +440,7 @@ export class SinglyLinkedList {
insertAfter(existingValueOrNode: T, newValue: T): boolean
insertAfter(existingValueOrNode: SinglyLinkedListNode, newValue: T): boolean
+
/**
* The `insertAfter` function inserts a new node with a given value after an existing node in a singly linked list.
* @param {T | SinglyLinkedListNode} existingValueOrNode - The existing value or node in the linked list after which
@@ -487,4 +490,14 @@ export class SinglyLinkedList {
return count;
}
+
+
+ * [Symbol.iterator]() {
+ let current = this.head;
+
+ while (current) {
+ yield current.val;
+ current = current.next;
+ }
+ }
}
diff --git a/src/data-structures/queue/queue.ts b/src/data-structures/queue/queue.ts
index d77e24d..2c93e35 100644
--- a/src/data-structures/queue/queue.ts
+++ b/src/data-structures/queue/queue.ts
@@ -5,7 +5,7 @@
*/
import {SinglyLinkedList} from '../linked-list';
-export class Queue extends SinglyLinkedList {
+export class LinkedListQueue extends SinglyLinkedList {
/**
* The enqueue function adds a value to the end of an array.
@@ -30,20 +30,9 @@ export class Queue extends SinglyLinkedList {
peek(): T | undefined {
return this.head?.val;
}
-
- * [Symbol.iterator]() {
- let current = this.head;
-
- while (current) {
- yield current.val;
- current = current.next;
- }
- }
}
-export class ArrayQueue {
- protected _nodes: T[];
- protected _offset: number;
+export class Queue {
/**
* The constructor initializes an instance of a class with an optional array of elements and sets the offset to 0.
@@ -56,12 +45,32 @@ export class ArrayQueue {
this._offset = 0;
}
+ private _nodes: T[];
+
+ get nodes(): T[] {
+ return this._nodes;
+ }
+
+ set nodes(value: T[]) {
+ this._nodes = value;
+ }
+
+ private _offset: number;
+
+ get offset(): number {
+ return this._offset;
+ }
+
+ set offset(value: number) {
+ this._offset = value;
+ }
+
/**
* The size function returns the number of elements in an array.
* @returns {number} The size of the array, which is the difference between the length of the array and the offset.
*/
get size(): number {
- return this._nodes.length - this._offset;
+ return this.nodes.length - this.offset;
}
/**
@@ -72,8 +81,8 @@ export class ArrayQueue {
* @returns The method is returning a new instance of the Queue class, initialized with the elements from the input
* array.
*/
- static fromArray(elements: T[]): ArrayQueue {
- return new ArrayQueue(elements);
+ static fromArray(elements: T[]): Queue {
+ return new Queue(elements);
}
/**
@@ -81,8 +90,8 @@ export class ArrayQueue {
* @param {T} element - The `element` parameter represents the element that you want to add to the queue.
* @returns The `add` method is returning a `Queue` object.
*/
- push(element: T): ArrayQueue {
- this._nodes.push(element);
+ push(element: T): Queue {
+ this.nodes.push(element);
return this;
}
@@ -91,18 +100,18 @@ export class ArrayQueue {
* necessary to optimize performance.
* @returns The function `shift()` returns either the first element in the queue or `null` if the queue is empty.
*/
- shift(): T | null {
- if (this.size === 0) return null;
+ shift(): T | undefined {
+ if (this.size === 0) return undefined;
const first = this.peek();
- this._offset += 1;
+ this.offset += 1;
- if (this._offset * 2 < this._nodes.length) return first;
+ if (this.offset * 2 < this.nodes.length) return first;
// only remove dequeued elements when reaching half size
// to decrease latency of shifting elements.
- this._nodes = this._nodes.slice(this._offset);
- this._offset = 0;
+ this.nodes = this.nodes.slice(this.offset);
+ this.offset = 0;
return first;
}
@@ -111,8 +120,8 @@ export class ArrayQueue {
* @returns The `peek()` method returns the first element of the data structure, represented by the `_nodes` array at
* the `_offset` index. If the data structure is empty (size is 0), it returns `null`.
*/
- peek(): T | null {
- return this.size > 0 ? this._nodes[this._offset] : null;
+ peek(): T | undefined {
+ return this.size > 0 ? this.nodes[this.offset] : undefined;
}
/**
@@ -120,8 +129,8 @@ export class ArrayQueue {
* @returns The method `peekLast()` returns the last element of the `_nodes` array if the array is not empty. If the
* array is empty, it returns `null`.
*/
- peekLast(): T | null {
- return this.size > 0 ? this._nodes[this._nodes.length - 1] : null;
+ peekLast(): T | undefined {
+ return this.size > 0 ? this.nodes[this.nodes.length - 1] : undefined;
}
/**
@@ -136,10 +145,14 @@ export class ArrayQueue {
* The `dequeue` function removes and returns the first element from a queue, or returns null if the queue is empty.
* @returns The method is returning a value of type T or null.
*/
- dequeue(): T | null {
+ dequeue(): T | undefined {
return this.shift();
}
+ getAt(index: number): T | undefined {
+ return this.nodes[index];
+ }
+
/**
* The function checks if a data structure is empty by comparing its size to zero.
* @returns {boolean} A boolean value indicating whether the size of the object is 0 or not.
@@ -153,22 +166,28 @@ export class ArrayQueue {
* @returns An array of type T is being returned.
*/
toArray(): T[] {
- return this._nodes.slice(this._offset);
+ return this.nodes.slice(this.offset);
}
/**
* The clear function resets the nodes array and offset to their initial values.
*/
clear(): void {
- this._nodes = [];
- this._offset = 0;
+ this.nodes = [];
+ this.offset = 0;
}
/**
* The `clone()` function returns a new Queue object with the same elements as the original Queue.
* @returns The `clone()` method is returning a new instance of the `Queue` class.
*/
- clone(): ArrayQueue {
- return new ArrayQueue(this._nodes.slice(this._offset));
+ clone(): Queue {
+ return new Queue(this.nodes.slice(this.offset));
+ }
+
+ * [Symbol.iterator]() {
+ for (const item of this.nodes) {
+ yield item;
+ }
}
}
diff --git a/tests/integration/avl-tree.test.ts b/tests/integration/avl-tree.test.ts
index 9a37fe4..b95e812 100644
--- a/tests/integration/avl-tree.test.ts
+++ b/tests/integration/avl-tree.test.ts
@@ -1,114 +1,114 @@
import {AVLTree} from 'avl-tree-typed';
describe('AVL Tree Test', () => {
- it('should perform various operations on a AVL Tree', () => {
+ it('should perform various operations on a AVL Tree', () => {
- const arr = [11, 3, 15, 1, 8, 13, 16, 2, 6, 9, 12, 14, 4, 7, 10, 5];
- const tree = new AVLTree();
+ const arr = [11, 3, 15, 1, 8, 13, 16, 2, 6, 9, 12, 14, 4, 7, 10, 5];
+ const tree = new AVLTree();
- for (const i of arr) tree.add(i, i);
+ for (const i of arr) tree.add(i, i);
- const node6 = tree.get(6);
+ const node6 = tree.get(6);
- expect(node6 && tree.getHeight(node6)).toBe(3);
- expect(node6 && tree.getDepth(node6)).toBe(1);
+ expect(node6 && tree.getHeight(node6)).toBe(3);
+ expect(node6 && tree.getDepth(node6)).toBe(1);
- const getNodeById = tree.get(10, 'id');
- expect(getNodeById?.id).toBe(10);
+ const getNodeById = tree.get(10, 'id');
+ expect(getNodeById?.id).toBe(10);
- const getMinNodeByRoot = tree.getLeftMost();
- expect(getMinNodeByRoot?.id).toBe(1);
+ const getMinNodeByRoot = tree.getLeftMost();
+ expect(getMinNodeByRoot?.id).toBe(1);
- const node15 = tree.get(15);
- const getMinNodeBySpecificNode = node15 && tree.getLeftMost(node15);
- expect(getMinNodeBySpecificNode?.id).toBe(12);
+ const node15 = tree.get(15);
+ const getMinNodeBySpecificNode = node15 && tree.getLeftMost(node15);
+ expect(getMinNodeBySpecificNode?.id).toBe(12);
- const subTreeSum = node15 && tree.subTreeSum(node15);
- expect(subTreeSum).toBe(70);
+ const subTreeSum = node15 && tree.subTreeSum(node15);
+ expect(subTreeSum).toBe(70);
- const lesserSum = tree.lesserSum(10);
- expect(lesserSum).toBe(45);
+ const lesserSum = tree.lesserSum(10);
+ expect(lesserSum).toBe(45);
- // node15 has type problem. After the uniform design, the generics of containers (DirectedGraph, BST) are based on the type of value. However, this design has a drawback: when I attempt to inherit from the Vertex or BSTNode classes, the types of the results obtained by all methods are those of the parent class.
- expect(node15?.val).toBe(15);
+ // node15 has type problem. After the uniform design, the generics of containers (DirectedGraph, BST) are based on the type of value. However, this design has a drawback: when I attempt to inherit from the Vertex or BSTNode classes, the types of the results obtained by all methods are those of the parent class.
+ expect(node15?.val).toBe(15);
- const node11 = tree.get(11);
+ const node11 = tree.get(11);
- const dfs = tree.DFS('in', 'node');
- expect(dfs[0].id).toBe(1);
- expect(dfs[dfs.length - 1].id).toBe(16);
+ const dfs = tree.DFS('in', 'node');
+ expect(dfs[0].id).toBe(1);
+ expect(dfs[dfs.length - 1].id).toBe(16);
- tree.perfectlyBalance();
- const bfs = tree.BFS('node');
- expect(tree.isPerfectlyBalanced()).toBe(true);
- expect(bfs[0].id).toBe(8);
- expect(bfs[bfs.length - 1].id).toBe(16);
+ tree.perfectlyBalance();
+ const bfs = tree.BFS('node');
+ expect(tree.isPerfectlyBalanced()).toBe(true);
+ expect(bfs[0].id).toBe(8);
+ expect(bfs[bfs.length - 1].id).toBe(16);
- expect(tree.remove(11, true)[0].deleted?.id).toBe(11);
- expect(tree.isAVLBalanced()).toBe(true);
- expect(node15 && tree.getHeight(node15)).toBe(2);
+ expect(tree.remove(11, true)[0].deleted?.id).toBe(11);
+ expect(tree.isAVLBalanced()).toBe(true);
+ expect(node15 && tree.getHeight(node15)).toBe(2);
- expect(tree.remove(1, true)[0].deleted?.id).toBe(1);
- expect(tree.isAVLBalanced()).toBe(true);
- expect(tree.getHeight()).toBe(4);
+ expect(tree.remove(1, true)[0].deleted?.id).toBe(1);
+ expect(tree.isAVLBalanced()).toBe(true);
+ expect(tree.getHeight()).toBe(4);
- expect(tree.remove(4, true)[0].deleted?.id).toBe(4);
- expect(tree.isAVLBalanced()).toBe(true);
- expect(tree.getHeight()).toBe(4);
+ expect(tree.remove(4, true)[0].deleted?.id).toBe(4);
+ expect(tree.isAVLBalanced()).toBe(true);
+ expect(tree.getHeight()).toBe(4);
- expect(tree.remove(10, true)[0].deleted?.id).toBe(10);
- expect(tree.isAVLBalanced()).toBe(true);
- expect(tree.getHeight()).toBe(3);
+ expect(tree.remove(10, true)[0].deleted?.id).toBe(10);
+ expect(tree.isAVLBalanced()).toBe(true);
+ expect(tree.getHeight()).toBe(3);
- expect(tree.remove(15, true)[0].deleted?.id).toBe(15);
- expect(tree.isAVLBalanced()).toBe(true);
+ expect(tree.remove(15, true)[0].deleted?.id).toBe(15);
+ expect(tree.isAVLBalanced()).toBe(true);
- expect(tree.getHeight()).toBe(3);
+ expect(tree.getHeight()).toBe(3);
- expect(tree.remove(5, true)[0].deleted?.id).toBe(5);
- expect(tree.isAVLBalanced()).toBe(true);
- expect(tree.getHeight()).toBe(3);
+ expect(tree.remove(5, true)[0].deleted?.id).toBe(5);
+ expect(tree.isAVLBalanced()).toBe(true);
+ expect(tree.getHeight()).toBe(3);
- expect(tree.remove(13, true)[0].deleted?.id).toBe(13);
- expect(tree.isAVLBalanced()).toBe(true);
- expect(tree.getHeight()).toBe(3);
+ expect(tree.remove(13, true)[0].deleted?.id).toBe(13);
+ expect(tree.isAVLBalanced()).toBe(true);
+ expect(tree.getHeight()).toBe(3);
- expect(tree.remove(3, true)[0].deleted?.id).toBe(3);
- expect(tree.isAVLBalanced()).toBe(true);
- expect(tree.getHeight()).toBe(3);
+ expect(tree.remove(3, true)[0].deleted?.id).toBe(3);
+ expect(tree.isAVLBalanced()).toBe(true);
+ expect(tree.getHeight()).toBe(3);
- expect(tree.remove(8, true)[0].deleted?.id).toBe(8);
- expect(tree.isAVLBalanced()).toBe(true);
- expect(tree.getHeight()).toBe(3);
+ expect(tree.remove(8, true)[0].deleted?.id).toBe(8);
+ expect(tree.isAVLBalanced()).toBe(true);
+ expect(tree.getHeight()).toBe(3);
- expect(tree.remove(6, true)[0].deleted?.id).toBe(6);
- expect(tree.remove(6, true).length).toBe(0);
- expect(tree.isAVLBalanced()).toBe(true);
- expect(tree.getHeight()).toBe(2);
+ expect(tree.remove(6, true)[0].deleted?.id).toBe(6);
+ expect(tree.remove(6, true).length).toBe(0);
+ expect(tree.isAVLBalanced()).toBe(true);
+ expect(tree.getHeight()).toBe(2);
- expect(tree.remove(7, true)[0].deleted?.id).toBe(7);
- expect(tree.isAVLBalanced()).toBe(true);
- expect(tree.getHeight()).toBe(2);
+ expect(tree.remove(7, true)[0].deleted?.id).toBe(7);
+ expect(tree.isAVLBalanced()).toBe(true);
+ expect(tree.getHeight()).toBe(2);
- expect(tree.remove(9, true)[0].deleted?.id).toBe(9);
- expect(tree.isAVLBalanced()).toBe(true);
- expect(tree.getHeight()).toBe(2);
- expect(tree.remove(14, true)[0].deleted?.id).toBe(14);
- expect(tree.isAVLBalanced()).toBe(true);
- expect(tree.getHeight()).toBe(1);
+ expect(tree.remove(9, true)[0].deleted?.id).toBe(9);
+ expect(tree.isAVLBalanced()).toBe(true);
+ expect(tree.getHeight()).toBe(2);
+ expect(tree.remove(14, true)[0].deleted?.id).toBe(14);
+ expect(tree.isAVLBalanced()).toBe(true);
+ expect(tree.getHeight()).toBe(1);
- expect(tree.isAVLBalanced()).toBe(true);
- const lastBFSIds = tree.BFS();
- expect(lastBFSIds[0]).toBe(12);
- expect(lastBFSIds[1]).toBe(2);
- expect(lastBFSIds[2]).toBe(16);
+ expect(tree.isAVLBalanced()).toBe(true);
+ const lastBFSIds = tree.BFS();
+ expect(lastBFSIds[0]).toBe(12);
+ expect(lastBFSIds[1]).toBe(2);
+ expect(lastBFSIds[2]).toBe(16);
- const lastBFSNodes = tree.BFS('node');
- expect(lastBFSNodes[0].id).toBe(12);
- expect(lastBFSNodes[1].id).toBe(2);
- expect(lastBFSNodes[2].id).toBe(16);
- });
+ const lastBFSNodes = tree.BFS('node');
+ expect(lastBFSNodes[0].id).toBe(12);
+ expect(lastBFSNodes[1].id).toBe(2);
+ expect(lastBFSNodes[2].id).toBe(16);
+ });
});
diff --git a/tests/integration/bst.test.ts b/tests/integration/bst.test.ts
index 51ec598..37c6f47 100644
--- a/tests/integration/bst.test.ts
+++ b/tests/integration/bst.test.ts
@@ -1,371 +1,371 @@
import {BST, BSTNode} from 'bst-typed';
describe('Individual package BST operations test', () => {
- it('should perform various operations on a Binary Search Tree with numeric values', () => {
- const bst = new BST();
- expect(bst).toBeInstanceOf(BST);
- bst.add(11, 11);
- bst.add(3, 3);
- const idsOrVals = [15, 1, 8, 13, 16, 2, 6, 9, 12, 14, 4, 7, 10, 5];
- bst.addMany(idsOrVals, idsOrVals);
- expect(bst.root).toBeInstanceOf(BSTNode);
+ it('should perform various operations on a Binary Search Tree with numeric values', () => {
+ const bst = new BST();
+ expect(bst).toBeInstanceOf(BST);
+ bst.add(11, 11);
+ bst.add(3, 3);
+ const idsOrVals = [15, 1, 8, 13, 16, 2, 6, 9, 12, 14, 4, 7, 10, 5];
+ bst.addMany(idsOrVals, idsOrVals);
+ expect(bst.root).toBeInstanceOf(BSTNode);
- if (bst.root) expect(bst.root.id).toBe(11);
+ if (bst.root) expect(bst.root.id).toBe(11);
- expect(bst.size).toBe(16);
+ expect(bst.size).toBe(16);
- expect(bst.has(6)).toBe(true);
+ expect(bst.has(6)).toBe(true);
- const node6 = bst.get(6);
- expect(node6 && bst.getHeight(6)).toBe(2);
- expect(node6 && bst.getDepth(6)).toBe(3);
+ const node6 = bst.get(6);
+ expect(node6 && bst.getHeight(6)).toBe(2);
+ expect(node6 && bst.getDepth(6)).toBe(3);
- const nodeId10 = bst.get(10);
- expect(nodeId10?.id).toBe(10);
+ const nodeId10 = bst.get(10);
+ expect(nodeId10?.id).toBe(10);
- const nodeVal9 = bst.get(9, 'val');
- expect(nodeVal9?.id).toBe(9);
+ const nodeVal9 = bst.get(9, 'val');
+ expect(nodeVal9?.id).toBe(9);
- const leftMost = bst.getLeftMost();
- expect(leftMost?.id).toBe(1);
+ const leftMost = bst.getLeftMost();
+ expect(leftMost?.id).toBe(1);
- const node15 = bst.get(15);
- const minNodeBySpecificNode = node15 && bst.getLeftMost(node15);
- expect(minNodeBySpecificNode?.id).toBe(12);
-
- const subTreeSum = node15 && bst.subTreeSum(15);
- expect(subTreeSum).toBe(70);
-
- const lesserSum = bst.lesserSum(10);
- expect(lesserSum).toBe(45);
-
- expect(node15).toBeInstanceOf(BSTNode);
-
- const node11 = bst.get(11);
- expect(node11).toBeInstanceOf(BSTNode);
-
- const dfsInorderNodes = bst.DFS('in', 'node');
- expect(dfsInorderNodes[0].id).toBe(1);
- expect(dfsInorderNodes[dfsInorderNodes.length - 1].id).toBe(16);
-
- bst.perfectlyBalance();
- expect(bst.isPerfectlyBalanced()).toBe(true);
-
- const bfsNodesAfterBalanced = bst.BFS('node');
- expect(bfsNodesAfterBalanced[0].id).toBe(8);
- expect(bfsNodesAfterBalanced[bfsNodesAfterBalanced.length - 1].id).toBe(16);
-
- const removed11 = bst.remove(11, true);
- expect(removed11).toBeInstanceOf(Array);
- expect(removed11[0]).toBeDefined();
- expect(removed11[0].deleted).toBeDefined();
-
- if (removed11[0].deleted) expect(removed11[0].deleted.id).toBe(11);
-
- expect(bst.isAVLBalanced()).toBe(true);
-
- expect(bst.getHeight(15)).toBe(1);
-
- const removed1 = bst.remove(1, true);
- expect(removed1).toBeInstanceOf(Array);
- expect(removed1[0]).toBeDefined();
- expect(removed1[0].deleted).toBeDefined();
- if (removed1[0].deleted) expect(removed1[0].deleted.id).toBe(1);
-
- expect(bst.isAVLBalanced()).toBe(true);
-
- expect(bst.getHeight()).toBe(4);
-
- const removed4 = bst.remove(4, true);
- expect(removed4).toBeInstanceOf(Array);
- expect(removed4[0]).toBeDefined();
- expect(removed4[0].deleted).toBeDefined();
- if (removed4[0].deleted) expect(removed4[0].deleted.id).toBe(4);
- expect(bst.isAVLBalanced()).toBe(true);
- expect(bst.getHeight()).toBe(4);
-
- const removed10 = bst.remove(10, true);
- expect(removed10).toBeInstanceOf(Array);
- expect(removed10[0]).toBeDefined();
- expect(removed10[0].deleted).toBeDefined();
- if (removed10[0].deleted) expect(removed10[0].deleted.id).toBe(10);
- expect(bst.isAVLBalanced()).toBe(false);
- expect(bst.getHeight()).toBe(4);
-
- const removed15 = bst.remove(15, true);
- expect(removed15).toBeInstanceOf(Array);
- expect(removed15[0]).toBeDefined();
- expect(removed15[0].deleted).toBeDefined();
- if (removed15[0].deleted) expect(removed15[0].deleted.id).toBe(15);
-
- expect(bst.isAVLBalanced()).toBe(true);
- expect(bst.getHeight()).toBe(3);
-
- const removed5 = bst.remove(5, true);
- expect(removed5).toBeInstanceOf(Array);
- expect(removed5[0]).toBeDefined();
- expect(removed5[0].deleted).toBeDefined();
- if (removed5[0].deleted) expect(removed5[0].deleted.id).toBe(5);
-
- expect(bst.isAVLBalanced()).toBe(true);
- expect(bst.getHeight()).toBe(3);
-
- const removed13 = bst.remove(13, true);
- expect(removed13).toBeInstanceOf(Array);
- expect(removed13[0]).toBeDefined();
- expect(removed13[0].deleted).toBeDefined();
- if (removed13[0].deleted) expect(removed13[0].deleted.id).toBe(13);
- expect(bst.isAVLBalanced()).toBe(true);
- expect(bst.getHeight()).toBe(3);
-
- const removed3 = bst.remove(3, true);
- expect(removed3).toBeInstanceOf(Array);
- expect(removed3[0]).toBeDefined();
- expect(removed3[0].deleted).toBeDefined();
- if (removed3[0].deleted) expect(removed3[0].deleted.id).toBe(3);
- expect(bst.isAVLBalanced()).toBe(false);
- expect(bst.getHeight()).toBe(3);
-
- const removed8 = bst.remove(8, true);
- expect(removed8).toBeInstanceOf(Array);
- expect(removed8[0]).toBeDefined();
- expect(removed8[0].deleted).toBeDefined();
- if (removed8[0].deleted) expect(removed8[0].deleted.id).toBe(8);
- expect(bst.isAVLBalanced()).toBe(true);
- expect(bst.getHeight()).toBe(3);
-
- const removed6 = bst.remove(6, true);
- expect(removed6).toBeInstanceOf(Array);
- expect(removed6[0]).toBeDefined();
- expect(removed6[0].deleted).toBeDefined();
- if (removed6[0].deleted) expect(removed6[0].deleted.id).toBe(6);
- expect(bst.remove(6, true).length).toBe(0);
- expect(bst.isAVLBalanced()).toBe(false);
- expect(bst.getHeight()).toBe(3);
-
- const removed7 = bst.remove(7, true);
- expect(removed7).toBeInstanceOf(Array);
- expect(removed7[0]).toBeDefined();
- expect(removed7[0].deleted).toBeDefined();
- if (removed7[0].deleted) expect(removed7[0].deleted.id).toBe(7);
- expect(bst.isAVLBalanced()).toBe(false);
- expect(bst.getHeight()).toBe(3);
-
- const removed9 = bst.remove(9, true);
- expect(removed9).toBeInstanceOf(Array);
- expect(removed9[0]).toBeDefined();
- expect(removed9[0].deleted).toBeDefined();
- if (removed9[0].deleted) expect(removed9[0].deleted.id).toBe(9);
- expect(bst.isAVLBalanced()).toBe(false);
- expect(bst.getHeight()).toBe(3);
-
- const removed14 = bst.remove(14, true);
- expect(removed14).toBeInstanceOf(Array);
- expect(removed14[0]).toBeDefined();
- expect(removed14[0].deleted).toBeDefined();
- if (removed14[0].deleted) expect(removed14[0].deleted.id).toBe(14);
- expect(bst.isAVLBalanced()).toBe(false);
- expect(bst.getHeight()).toBe(2);
-
-
- expect(bst.isAVLBalanced()).toBe(false);
-
- const bfsIDs = bst.BFS();
- expect(bfsIDs[0]).toBe(2);
- expect(bfsIDs[1]).toBe(12);
- expect(bfsIDs[2]).toBe(16);
-
- const bfsNodes = bst.BFS('node');
- expect(bfsNodes[0].id).toBe(2);
- expect(bfsNodes[1].id).toBe(12);
- expect(bfsNodes[2].id).toBe(16);
-
- });
-
- it('should perform various operations on a Binary Search Tree with object values', () => {
- const objBST = new BST>();
- expect(objBST).toBeInstanceOf(BST);
- objBST.add(11, {id: 11, keyA: 11});
- objBST.add(3, {id: 3, keyA: 3});
- const values = [{id: 15, keyA: 15}, {id: 1, keyA: 1}, {id: 8, keyA: 8},
- {id: 13, keyA: 13}, {id: 16, keyA: 16}, {id: 2, keyA: 2},
- {id: 6, keyA: 6}, {id: 9, keyA: 9}, {id: 12, keyA: 12},
- {id: 14, keyA: 14}, {id: 4, keyA: 4}, {id: 7, keyA: 7},
- {id: 10, keyA: 10}, {id: 5, keyA: 5}];
-
- objBST.addMany(values.map(item => item.id), values);
-
- expect(objBST.root).toBeInstanceOf(BSTNode);
-
- if (objBST.root) expect(objBST.root.id).toBe(11);
-
- expect(objBST.has(6)).toBe(true);
-
- const node6 = objBST.get(6);
- expect(node6 && objBST.getHeight(node6)).toBe(2);
- expect(node6 && objBST.getDepth(node6)).toBe(3);
-
- const nodeId10 = objBST.get(10, 'id');
- expect(nodeId10?.id).toBe(10);
-
- const nodeVal9 = objBST.get(9, 'id');
- expect(nodeVal9?.id).toBe(9);
-
- const leftMost = objBST.getLeftMost();
- expect(leftMost?.id).toBe(1);
-
- const node15 = objBST.get(15);
- expect(node15?.val).toEqual({id: 15, keyA: 15});
- const minNodeBySpecificNode = node15 && objBST.getLeftMost(node15);
- expect(minNodeBySpecificNode?.id).toBe(12);
-
- const subTreeSum = node15 && objBST.subTreeSum(node15);
- expect(subTreeSum).toBe(70);
-
- const lesserSum = objBST.lesserSum(10);
- expect(lesserSum).toBe(45);
-
- expect(node15).toBeInstanceOf(BSTNode);
-
- const node11 = objBST.get(11);
- expect(node11).toBeInstanceOf(BSTNode);
-
- const dfsInorderNodes = objBST.DFS('in', 'node');
- expect(dfsInorderNodes[0].id).toBe(1);
- expect(dfsInorderNodes[dfsInorderNodes.length - 1].id).toBe(16);
-
- objBST.perfectlyBalance();
- expect(objBST.isPerfectlyBalanced()).toBe(true);
-
- const bfsNodesAfterBalanced = objBST.BFS('node');
- expect(bfsNodesAfterBalanced[0].id).toBe(8);
- expect(bfsNodesAfterBalanced[bfsNodesAfterBalanced.length - 1].id).toBe(16);
-
- const removed11 = objBST.remove(11, true);
- expect(removed11).toBeInstanceOf(Array);
- expect(removed11[0]).toBeDefined();
- expect(removed11[0].deleted).toBeDefined();
-
- if (removed11[0].deleted) expect(removed11[0].deleted.id).toBe(11);
-
- expect(objBST.isAVLBalanced()).toBe(true);
-
- expect(node15 && objBST.getHeight(node15)).toBe(2);
-
- const removed1 = objBST.remove(1, true);
- expect(removed1).toBeInstanceOf(Array);
- expect(removed1[0]).toBeDefined();
- expect(removed1[0].deleted).toBeDefined();
- if (removed1[0].deleted) expect(removed1[0].deleted.id).toBe(1);
-
- expect(objBST.isAVLBalanced()).toBe(true);
-
- expect(objBST.getHeight()).toBe(4);
-
- const removed4 = objBST.remove(4, true);
- expect(removed4).toBeInstanceOf(Array);
- expect(removed4[0]).toBeDefined();
- expect(removed4[0].deleted).toBeDefined();
- if (removed4[0].deleted) expect(removed4[0].deleted.id).toBe(4);
- expect(objBST.isAVLBalanced()).toBe(true);
- expect(objBST.getHeight()).toBe(4);
-
- const removed10 = objBST.remove(10, true);
- expect(removed10).toBeInstanceOf(Array);
- expect(removed10[0]).toBeDefined();
- expect(removed10[0].deleted).toBeDefined();
- if (removed10[0].deleted) expect(removed10[0].deleted.id).toBe(10);
- expect(objBST.isAVLBalanced()).toBe(false);
- expect(objBST.getHeight()).toBe(4);
-
- const removed15 = objBST.remove(15, true);
- expect(removed15).toBeInstanceOf(Array);
- expect(removed15[0]).toBeDefined();
- expect(removed15[0].deleted).toBeDefined();
- if (removed15[0].deleted) expect(removed15[0].deleted.id).toBe(15);
-
- expect(objBST.isAVLBalanced()).toBe(true);
- expect(objBST.getHeight()).toBe(3);
-
- const removed5 = objBST.remove(5, true);
- expect(removed5).toBeInstanceOf(Array);
- expect(removed5[0]).toBeDefined();
- expect(removed5[0].deleted).toBeDefined();
- if (removed5[0].deleted) expect(removed5[0].deleted.id).toBe(5);
-
- expect(objBST.isAVLBalanced()).toBe(true);
- expect(objBST.getHeight()).toBe(3);
-
- const removed13 = objBST.remove(13, true);
- expect(removed13).toBeInstanceOf(Array);
- expect(removed13[0]).toBeDefined();
- expect(removed13[0].deleted).toBeDefined();
- if (removed13[0].deleted) expect(removed13[0].deleted.id).toBe(13);
- expect(objBST.isAVLBalanced()).toBe(true);
- expect(objBST.getHeight()).toBe(3);
-
- const removed3 = objBST.remove(3, true);
- expect(removed3).toBeInstanceOf(Array);
- expect(removed3[0]).toBeDefined();
- expect(removed3[0].deleted).toBeDefined();
- if (removed3[0].deleted) expect(removed3[0].deleted.id).toBe(3);
- expect(objBST.isAVLBalanced()).toBe(false);
- expect(objBST.getHeight()).toBe(3);
-
- const removed8 = objBST.remove(8, true);
- expect(removed8).toBeInstanceOf(Array);
- expect(removed8[0]).toBeDefined();
- expect(removed8[0].deleted).toBeDefined();
- if (removed8[0].deleted) expect(removed8[0].deleted.id).toBe(8);
- expect(objBST.isAVLBalanced()).toBe(true);
- expect(objBST.getHeight()).toBe(3);
-
- const removed6 = objBST.remove(6, true);
- expect(removed6).toBeInstanceOf(Array);
- expect(removed6[0]).toBeDefined();
- expect(removed6[0].deleted).toBeDefined();
- if (removed6[0].deleted) expect(removed6[0].deleted.id).toBe(6);
- expect(objBST.remove(6, true).length).toBe(0);
- expect(objBST.isAVLBalanced()).toBe(false);
- expect(objBST.getHeight()).toBe(3);
-
- const removed7 = objBST.remove(7, true);
- expect(removed7).toBeInstanceOf(Array);
- expect(removed7[0]).toBeDefined();
- expect(removed7[0].deleted).toBeDefined();
- if (removed7[0].deleted) expect(removed7[0].deleted.id).toBe(7);
- expect(objBST.isAVLBalanced()).toBe(false);
- expect(objBST.getHeight()).toBe(3);
-
- const removed9 = objBST.remove(9, true);
- expect(removed9).toBeInstanceOf(Array);
- expect(removed9[0]).toBeDefined();
- expect(removed9[0].deleted).toBeDefined();
- if (removed9[0].deleted) expect(removed9[0].deleted.id).toBe(9);
- expect(objBST.isAVLBalanced()).toBe(false);
- expect(objBST.getHeight()).toBe(3);
-
- const removed14 = objBST.remove(14, true);
- expect(removed14).toBeInstanceOf(Array);
- expect(removed14[0]).toBeDefined();
- expect(removed14[0].deleted).toBeDefined();
- if (removed14[0].deleted) expect(removed14[0].deleted.id).toBe(14);
- expect(objBST.isAVLBalanced()).toBe(false);
- expect(objBST.getHeight()).toBe(2);
-
-
- expect(objBST.isAVLBalanced()).toBe(false);
-
- const bfsIDs = objBST.BFS();
- expect(bfsIDs[0]).toBe(2);
- expect(bfsIDs[1]).toBe(12);
- expect(bfsIDs[2]).toBe(16);
-
- const bfsNodes = objBST.BFS('node');
- expect(bfsNodes[0].id).toBe(2);
- expect(bfsNodes[1].id).toBe(12);
- expect(bfsNodes[2].id).toBe(16);
-
- });
+ const node15 = bst.get(15);
+ const minNodeBySpecificNode = node15 && bst.getLeftMost(node15);
+ expect(minNodeBySpecificNode?.id).toBe(12);
+
+ const subTreeSum = node15 && bst.subTreeSum(15);
+ expect(subTreeSum).toBe(70);
+
+ const lesserSum = bst.lesserSum(10);
+ expect(lesserSum).toBe(45);
+
+ expect(node15).toBeInstanceOf(BSTNode);
+
+ const node11 = bst.get(11);
+ expect(node11).toBeInstanceOf(BSTNode);
+
+ const dfsInorderNodes = bst.DFS('in', 'node');
+ expect(dfsInorderNodes[0].id).toBe(1);
+ expect(dfsInorderNodes[dfsInorderNodes.length - 1].id).toBe(16);
+
+ bst.perfectlyBalance();
+ expect(bst.isPerfectlyBalanced()).toBe(true);
+
+ const bfsNodesAfterBalanced = bst.BFS('node');
+ expect(bfsNodesAfterBalanced[0].id).toBe(8);
+ expect(bfsNodesAfterBalanced[bfsNodesAfterBalanced.length - 1].id).toBe(16);
+
+ const removed11 = bst.remove(11, true);
+ expect(removed11).toBeInstanceOf(Array);
+ expect(removed11[0]).toBeDefined();
+ expect(removed11[0].deleted).toBeDefined();
+
+ if (removed11[0].deleted) expect(removed11[0].deleted.id).toBe(11);
+
+ expect(bst.isAVLBalanced()).toBe(true);
+
+ expect(bst.getHeight(15)).toBe(1);
+
+ const removed1 = bst.remove(1, true);
+ expect(removed1).toBeInstanceOf(Array);
+ expect(removed1[0]).toBeDefined();
+ expect(removed1[0].deleted).toBeDefined();
+ if (removed1[0].deleted) expect(removed1[0].deleted.id).toBe(1);
+
+ expect(bst.isAVLBalanced()).toBe(true);
+
+ expect(bst.getHeight()).toBe(4);
+
+ const removed4 = bst.remove(4, true);
+ expect(removed4).toBeInstanceOf(Array);
+ expect(removed4[0]).toBeDefined();
+ expect(removed4[0].deleted).toBeDefined();
+ if (removed4[0].deleted) expect(removed4[0].deleted.id).toBe(4);
+ expect(bst.isAVLBalanced()).toBe(true);
+ expect(bst.getHeight()).toBe(4);
+
+ const removed10 = bst.remove(10, true);
+ expect(removed10).toBeInstanceOf(Array);
+ expect(removed10[0]).toBeDefined();
+ expect(removed10[0].deleted).toBeDefined();
+ if (removed10[0].deleted) expect(removed10[0].deleted.id).toBe(10);
+ expect(bst.isAVLBalanced()).toBe(false);
+ expect(bst.getHeight()).toBe(4);
+
+ const removed15 = bst.remove(15, true);
+ expect(removed15).toBeInstanceOf(Array);
+ expect(removed15[0]).toBeDefined();
+ expect(removed15[0].deleted).toBeDefined();
+ if (removed15[0].deleted) expect(removed15[0].deleted.id).toBe(15);
+
+ expect(bst.isAVLBalanced()).toBe(true);
+ expect(bst.getHeight()).toBe(3);
+
+ const removed5 = bst.remove(5, true);
+ expect(removed5).toBeInstanceOf(Array);
+ expect(removed5[0]).toBeDefined();
+ expect(removed5[0].deleted).toBeDefined();
+ if (removed5[0].deleted) expect(removed5[0].deleted.id).toBe(5);
+
+ expect(bst.isAVLBalanced()).toBe(true);
+ expect(bst.getHeight()).toBe(3);
+
+ const removed13 = bst.remove(13, true);
+ expect(removed13).toBeInstanceOf(Array);
+ expect(removed13[0]).toBeDefined();
+ expect(removed13[0].deleted).toBeDefined();
+ if (removed13[0].deleted) expect(removed13[0].deleted.id).toBe(13);
+ expect(bst.isAVLBalanced()).toBe(true);
+ expect(bst.getHeight()).toBe(3);
+
+ const removed3 = bst.remove(3, true);
+ expect(removed3).toBeInstanceOf(Array);
+ expect(removed3[0]).toBeDefined();
+ expect(removed3[0].deleted).toBeDefined();
+ if (removed3[0].deleted) expect(removed3[0].deleted.id).toBe(3);
+ expect(bst.isAVLBalanced()).toBe(false);
+ expect(bst.getHeight()).toBe(3);
+
+ const removed8 = bst.remove(8, true);
+ expect(removed8).toBeInstanceOf(Array);
+ expect(removed8[0]).toBeDefined();
+ expect(removed8[0].deleted).toBeDefined();
+ if (removed8[0].deleted) expect(removed8[0].deleted.id).toBe(8);
+ expect(bst.isAVLBalanced()).toBe(true);
+ expect(bst.getHeight()).toBe(3);
+
+ const removed6 = bst.remove(6, true);
+ expect(removed6).toBeInstanceOf(Array);
+ expect(removed6[0]).toBeDefined();
+ expect(removed6[0].deleted).toBeDefined();
+ if (removed6[0].deleted) expect(removed6[0].deleted.id).toBe(6);
+ expect(bst.remove(6, true).length).toBe(0);
+ expect(bst.isAVLBalanced()).toBe(false);
+ expect(bst.getHeight()).toBe(3);
+
+ const removed7 = bst.remove(7, true);
+ expect(removed7).toBeInstanceOf(Array);
+ expect(removed7[0]).toBeDefined();
+ expect(removed7[0].deleted).toBeDefined();
+ if (removed7[0].deleted) expect(removed7[0].deleted.id).toBe(7);
+ expect(bst.isAVLBalanced()).toBe(false);
+ expect(bst.getHeight()).toBe(3);
+
+ const removed9 = bst.remove(9, true);
+ expect(removed9).toBeInstanceOf(Array);
+ expect(removed9[0]).toBeDefined();
+ expect(removed9[0].deleted).toBeDefined();
+ if (removed9[0].deleted) expect(removed9[0].deleted.id).toBe(9);
+ expect(bst.isAVLBalanced()).toBe(false);
+ expect(bst.getHeight()).toBe(3);
+
+ const removed14 = bst.remove(14, true);
+ expect(removed14).toBeInstanceOf(Array);
+ expect(removed14[0]).toBeDefined();
+ expect(removed14[0].deleted).toBeDefined();
+ if (removed14[0].deleted) expect(removed14[0].deleted.id).toBe(14);
+ expect(bst.isAVLBalanced()).toBe(false);
+ expect(bst.getHeight()).toBe(2);
+
+
+ expect(bst.isAVLBalanced()).toBe(false);
+
+ const bfsIDs = bst.BFS();
+ expect(bfsIDs[0]).toBe(2);
+ expect(bfsIDs[1]).toBe(12);
+ expect(bfsIDs[2]).toBe(16);
+
+ const bfsNodes = bst.BFS('node');
+ expect(bfsNodes[0].id).toBe(2);
+ expect(bfsNodes[1].id).toBe(12);
+ expect(bfsNodes[2].id).toBe(16);
+
+ });
+
+ it('should perform various operations on a Binary Search Tree with object values', () => {
+ const objBST = new BST>();
+ expect(objBST).toBeInstanceOf(BST);
+ objBST.add(11, {id: 11, keyA: 11});
+ objBST.add(3, {id: 3, keyA: 3});
+ const values = [{id: 15, keyA: 15}, {id: 1, keyA: 1}, {id: 8, keyA: 8},
+ {id: 13, keyA: 13}, {id: 16, keyA: 16}, {id: 2, keyA: 2},
+ {id: 6, keyA: 6}, {id: 9, keyA: 9}, {id: 12, keyA: 12},
+ {id: 14, keyA: 14}, {id: 4, keyA: 4}, {id: 7, keyA: 7},
+ {id: 10, keyA: 10}, {id: 5, keyA: 5}];
+
+ objBST.addMany(values.map(item => item.id), values);
+
+ expect(objBST.root).toBeInstanceOf(BSTNode);
+
+ if (objBST.root) expect(objBST.root.id).toBe(11);
+
+ expect(objBST.has(6)).toBe(true);
+
+ const node6 = objBST.get(6);
+ expect(node6 && objBST.getHeight(node6)).toBe(2);
+ expect(node6 && objBST.getDepth(node6)).toBe(3);
+
+ const nodeId10 = objBST.get(10, 'id');
+ expect(nodeId10?.id).toBe(10);
+
+ const nodeVal9 = objBST.get(9, 'id');
+ expect(nodeVal9?.id).toBe(9);
+
+ const leftMost = objBST.getLeftMost();
+ expect(leftMost?.id).toBe(1);
+
+ const node15 = objBST.get(15);
+ expect(node15?.val).toEqual({id: 15, keyA: 15});
+ const minNodeBySpecificNode = node15 && objBST.getLeftMost(node15);
+ expect(minNodeBySpecificNode?.id).toBe(12);
+
+ const subTreeSum = node15 && objBST.subTreeSum(node15);
+ expect(subTreeSum).toBe(70);
+
+ const lesserSum = objBST.lesserSum(10);
+ expect(lesserSum).toBe(45);
+
+ expect(node15).toBeInstanceOf(BSTNode);
+
+ const node11 = objBST.get(11);
+ expect(node11).toBeInstanceOf(BSTNode);
+
+ const dfsInorderNodes = objBST.DFS('in', 'node');
+ expect(dfsInorderNodes[0].id).toBe(1);
+ expect(dfsInorderNodes[dfsInorderNodes.length - 1].id).toBe(16);
+
+ objBST.perfectlyBalance();
+ expect(objBST.isPerfectlyBalanced()).toBe(true);
+
+ const bfsNodesAfterBalanced = objBST.BFS('node');
+ expect(bfsNodesAfterBalanced[0].id).toBe(8);
+ expect(bfsNodesAfterBalanced[bfsNodesAfterBalanced.length - 1].id).toBe(16);
+
+ const removed11 = objBST.remove(11, true);
+ expect(removed11).toBeInstanceOf(Array);
+ expect(removed11[0]).toBeDefined();
+ expect(removed11[0].deleted).toBeDefined();
+
+ if (removed11[0].deleted) expect(removed11[0].deleted.id).toBe(11);
+
+ expect(objBST.isAVLBalanced()).toBe(true);
+
+ expect(node15 && objBST.getHeight(node15)).toBe(2);
+
+ const removed1 = objBST.remove(1, true);
+ expect(removed1).toBeInstanceOf(Array);
+ expect(removed1[0]).toBeDefined();
+ expect(removed1[0].deleted).toBeDefined();
+ if (removed1[0].deleted) expect(removed1[0].deleted.id).toBe(1);
+
+ expect(objBST.isAVLBalanced()).toBe(true);
+
+ expect(objBST.getHeight()).toBe(4);
+
+ const removed4 = objBST.remove(4, true);
+ expect(removed4).toBeInstanceOf(Array);
+ expect(removed4[0]).toBeDefined();
+ expect(removed4[0].deleted).toBeDefined();
+ if (removed4[0].deleted) expect(removed4[0].deleted.id).toBe(4);
+ expect(objBST.isAVLBalanced()).toBe(true);
+ expect(objBST.getHeight()).toBe(4);
+
+ const removed10 = objBST.remove(10, true);
+ expect(removed10).toBeInstanceOf(Array);
+ expect(removed10[0]).toBeDefined();
+ expect(removed10[0].deleted).toBeDefined();
+ if (removed10[0].deleted) expect(removed10[0].deleted.id).toBe(10);
+ expect(objBST.isAVLBalanced()).toBe(false);
+ expect(objBST.getHeight()).toBe(4);
+
+ const removed15 = objBST.remove(15, true);
+ expect(removed15).toBeInstanceOf(Array);
+ expect(removed15[0]).toBeDefined();
+ expect(removed15[0].deleted).toBeDefined();
+ if (removed15[0].deleted) expect(removed15[0].deleted.id).toBe(15);
+
+ expect(objBST.isAVLBalanced()).toBe(true);
+ expect(objBST.getHeight()).toBe(3);
+
+ const removed5 = objBST.remove(5, true);
+ expect(removed5).toBeInstanceOf(Array);
+ expect(removed5[0]).toBeDefined();
+ expect(removed5[0].deleted).toBeDefined();
+ if (removed5[0].deleted) expect(removed5[0].deleted.id).toBe(5);
+
+ expect(objBST.isAVLBalanced()).toBe(true);
+ expect(objBST.getHeight()).toBe(3);
+
+ const removed13 = objBST.remove(13, true);
+ expect(removed13).toBeInstanceOf(Array);
+ expect(removed13[0]).toBeDefined();
+ expect(removed13[0].deleted).toBeDefined();
+ if (removed13[0].deleted) expect(removed13[0].deleted.id).toBe(13);
+ expect(objBST.isAVLBalanced()).toBe(true);
+ expect(objBST.getHeight()).toBe(3);
+
+ const removed3 = objBST.remove(3, true);
+ expect(removed3).toBeInstanceOf(Array);
+ expect(removed3[0]).toBeDefined();
+ expect(removed3[0].deleted).toBeDefined();
+ if (removed3[0].deleted) expect(removed3[0].deleted.id).toBe(3);
+ expect(objBST.isAVLBalanced()).toBe(false);
+ expect(objBST.getHeight()).toBe(3);
+
+ const removed8 = objBST.remove(8, true);
+ expect(removed8).toBeInstanceOf(Array);
+ expect(removed8[0]).toBeDefined();
+ expect(removed8[0].deleted).toBeDefined();
+ if (removed8[0].deleted) expect(removed8[0].deleted.id).toBe(8);
+ expect(objBST.isAVLBalanced()).toBe(true);
+ expect(objBST.getHeight()).toBe(3);
+
+ const removed6 = objBST.remove(6, true);
+ expect(removed6).toBeInstanceOf(Array);
+ expect(removed6[0]).toBeDefined();
+ expect(removed6[0].deleted).toBeDefined();
+ if (removed6[0].deleted) expect(removed6[0].deleted.id).toBe(6);
+ expect(objBST.remove(6, true).length).toBe(0);
+ expect(objBST.isAVLBalanced()).toBe(false);
+ expect(objBST.getHeight()).toBe(3);
+
+ const removed7 = objBST.remove(7, true);
+ expect(removed7).toBeInstanceOf(Array);
+ expect(removed7[0]).toBeDefined();
+ expect(removed7[0].deleted).toBeDefined();
+ if (removed7[0].deleted) expect(removed7[0].deleted.id).toBe(7);
+ expect(objBST.isAVLBalanced()).toBe(false);
+ expect(objBST.getHeight()).toBe(3);
+
+ const removed9 = objBST.remove(9, true);
+ expect(removed9).toBeInstanceOf(Array);
+ expect(removed9[0]).toBeDefined();
+ expect(removed9[0].deleted).toBeDefined();
+ if (removed9[0].deleted) expect(removed9[0].deleted.id).toBe(9);
+ expect(objBST.isAVLBalanced()).toBe(false);
+ expect(objBST.getHeight()).toBe(3);
+
+ const removed14 = objBST.remove(14, true);
+ expect(removed14).toBeInstanceOf(Array);
+ expect(removed14[0]).toBeDefined();
+ expect(removed14[0].deleted).toBeDefined();
+ if (removed14[0].deleted) expect(removed14[0].deleted.id).toBe(14);
+ expect(objBST.isAVLBalanced()).toBe(false);
+ expect(objBST.getHeight()).toBe(2);
+
+
+ expect(objBST.isAVLBalanced()).toBe(false);
+
+ const bfsIDs = objBST.BFS();
+ expect(bfsIDs[0]).toBe(2);
+ expect(bfsIDs[1]).toBe(12);
+ expect(bfsIDs[2]).toBe(16);
+
+ const bfsNodes = objBST.BFS('node');
+ expect(bfsNodes[0].id).toBe(2);
+ expect(bfsNodes[1].id).toBe(12);
+ expect(bfsNodes[2].id).toBe(16);
+
+ });
});
diff --git a/tests/integration/heap.test.js b/tests/integration/heap.test.js
index bfb0aa9..f8aa94f 100644
--- a/tests/integration/heap.test.js
+++ b/tests/integration/heap.test.js
@@ -1,19 +1,19 @@
const {MinHeap} = require('heap-typed');
describe('JS Heap Operation Test', () => {
- it('should numeric heap work well', function () {
- const minNumHeap = new MinHeap();
- minNumHeap.add(1).add(6).add(2).add(0).add(5).add(9);
- expect(minNumHeap.poll()).toBe(0);
- expect(minNumHeap.poll()).toBe(1);
- expect(minNumHeap.peek()).toBe(2);
- expect(minNumHeap.toArray().length).toBe(4);
- expect(minNumHeap.toArray()[0]).toBe(2);
- expect(minNumHeap.toArray()[1]).toBe(5);
- expect(minNumHeap.toArray()[2]).toBe(9);
- expect(minNumHeap.toArray()[3]).toBe(6);
+ it('should numeric heap work well', function () {
+ const minNumHeap = new MinHeap();
+ minNumHeap.add(1).add(6).add(2).add(0).add(5).add(9);
+ expect(minNumHeap.poll()).toBe(0);
+ expect(minNumHeap.poll()).toBe(1);
+ expect(minNumHeap.peek()).toBe(2);
+ expect(minNumHeap.toArray().length).toBe(4);
+ expect(minNumHeap.toArray()[0]).toBe(2);
+ expect(minNumHeap.toArray()[1]).toBe(5);
+ expect(minNumHeap.toArray()[2]).toBe(9);
+ expect(minNumHeap.toArray()[3]).toBe(6);
- });
+ });
});
diff --git a/tests/integration/index.html b/tests/integration/index.html
index 73b956a..471464d 100644
--- a/tests/integration/index.html
+++ b/tests/integration/index.html
@@ -1,31 +1,45 @@
-
- CDN Test
+
+ CDN Test
-
+
-
-
+
-
+ avlTree.add(1, 1);
+ console.log(avlTree.BFS());
+ $modules.append($avlTree);
+
+
+ const queue = new ArrayQueue();
+ for (let i = 0; i < 1000000; i++) {
+ queue.enqueue(i);
+ }
+ let last = 0;
+ const startTime = performance.now();
+
+ for (let i = 0; i < 1000000; i++) {
+ last = queue.dequeue();
+ }
+
+ console.log(performance.now() - startTime)
+
-
\ No newline at end of file
+