release: 1.51.9

This commit is contained in:
Revone 2024-01-26 18:26:40 +08:00
parent 02d71a23ba
commit c2f98f851b
5 changed files with 38 additions and 38 deletions

View file

@ -8,7 +8,7 @@ All notable changes to this project will be documented in this file.
- [Semantic Versioning](https://semver.org/spec/v2.0.0.html)
- [`auto-changelog`](https://github.com/CookPete/auto-changelog)
## [v1.51.8](https://github.com/zrwusa/data-structure-typed/compare/v1.51.5...main) (upcoming)
## [v1.51.9](https://github.com/zrwusa/data-structure-typed/compare/v1.51.5...main) (upcoming)
## [v1.51.5](https://github.com/zrwusa/data-structure-typed/compare/v1.35.0...v1.51.5) (18 January 2024)

52
package-lock.json generated
View file

@ -1,12 +1,12 @@
{
"name": "data-structure-typed",
"version": "1.51.8",
"version": "1.51.9",
"lockfileVersion": 3,
"requires": true,
"packages": {
"": {
"name": "data-structure-typed",
"version": "1.51.8",
"version": "1.51.9",
"license": "MIT",
"devDependencies": {
"@swc/core": "^1.3.96",
@ -16,11 +16,11 @@
"@typescript-eslint/eslint-plugin": "^6.7.4",
"@typescript-eslint/parser": "^6.7.4",
"auto-changelog": "^2.4.0",
"avl-tree-typed": "^1.51.7",
"avl-tree-typed": "^1.51.8",
"benchmark": "^2.1.4",
"binary-tree-typed": "^1.51.7",
"bst-typed": "^1.51.7",
"data-structure-typed": "^1.51.7",
"binary-tree-typed": "^1.51.8",
"bst-typed": "^1.51.8",
"data-structure-typed": "^1.51.8",
"dependency-cruiser": "^14.1.0",
"doctoc": "^2.2.1",
"eslint": "^8.50.0",
@ -29,7 +29,7 @@
"eslint-import-resolver-typescript": "^3.6.1",
"eslint-plugin-import": "^2.28.1",
"fast-glob": "^3.3.1",
"heap-typed": "^1.51.7",
"heap-typed": "^1.51.8",
"istanbul-badges-readme": "^1.8.5",
"jest": "^29.7.0",
"js-sdsl": "^4.4.2",
@ -3097,12 +3097,12 @@
}
},
"node_modules/avl-tree-typed": {
"version": "1.51.7",
"resolved": "https://registry.npmjs.org/avl-tree-typed/-/avl-tree-typed-1.51.7.tgz",
"integrity": "sha512-7ylhTBu3u26sTqTOxp+JiypGc9Rwv6S3eVL2dDDuXFRMIMZR1BUwgjT3VnF3B3EM/cLulVJ6DeEiT13OodZcCA==",
"version": "1.51.8",
"resolved": "https://registry.npmjs.org/avl-tree-typed/-/avl-tree-typed-1.51.8.tgz",
"integrity": "sha512-qBLdOI6W+Bh313ciFKcKegUD6BAHUSSUGVK/Rd0LYFrQiOS5K6yMKTKXr58Y6rORB0+GQ5+3LTR7yrdtpA+bDg==",
"dev": true,
"dependencies": {
"data-structure-typed": "^1.51.7"
"data-structure-typed": "^1.51.8"
}
},
"node_modules/babel-jest": {
@ -3306,12 +3306,12 @@
}
},
"node_modules/binary-tree-typed": {
"version": "1.51.7",
"resolved": "https://registry.npmjs.org/binary-tree-typed/-/binary-tree-typed-1.51.7.tgz",
"integrity": "sha512-oYFgefTymWz2N2dbTJYGkJXCjai7whlUaonfjVImqYElx41v7vcP2rAt+CxUcwUJdKRNDI70UtWpmpDd1pESrg==",
"version": "1.51.8",
"resolved": "https://registry.npmjs.org/binary-tree-typed/-/binary-tree-typed-1.51.8.tgz",
"integrity": "sha512-QKeJagMpBSK+/gb/ZgTcKa8+AMmiXe0n7x5iT7ubJDup5ARLCaUBm/Vdl91k1VdmmWJfaHkosDLTHG1CQLGpKg==",
"dev": true,
"dependencies": {
"data-structure-typed": "^1.51.7"
"data-structure-typed": "^1.51.8"
}
},
"node_modules/brace-expansion": {
@ -3390,12 +3390,12 @@
}
},
"node_modules/bst-typed": {
"version": "1.51.7",
"resolved": "https://registry.npmjs.org/bst-typed/-/bst-typed-1.51.7.tgz",
"integrity": "sha512-PoYbsvbyndqhwVwDx3AzATPaRo0KGm8mxapz0oonv7Ahg0RoAvOAL3w8+LxioGNFI9rfbYnDL33IjdxFyDpWew==",
"version": "1.51.8",
"resolved": "https://registry.npmjs.org/bst-typed/-/bst-typed-1.51.8.tgz",
"integrity": "sha512-x18GNNBSsPCqyCtvhhaJ4i+3KGtiQeSCkicncXB+fmtt75sZ67RSuJj51lSKUuYeo3W1FVSGDD5HimAxNKGQAQ==",
"dev": true,
"dependencies": {
"data-structure-typed": "^1.51.7"
"data-structure-typed": "^1.51.8"
}
},
"node_modules/buffer-from": {
@ -3838,9 +3838,9 @@
}
},
"node_modules/data-structure-typed": {
"version": "1.51.7",
"resolved": "https://registry.npmjs.org/data-structure-typed/-/data-structure-typed-1.51.7.tgz",
"integrity": "sha512-JiR6SYZi0hgojPdojTLGeSHzLL/v0ppIqzB168FGWje6dUbS1P4+/80T6cFPukjIfatHvnm+7L3Z11E4XXSUdg==",
"version": "1.51.8",
"resolved": "https://registry.npmjs.org/data-structure-typed/-/data-structure-typed-1.51.8.tgz",
"integrity": "sha512-53+KXmVru74GJ7AjHf/e4pUgdaMlCV9yeNdM52HAUBPg+oF6YaSENBRWPsIQKM0+AmeY/APPhFunSQ8hSg04bg==",
"dev": true
},
"node_modules/debug": {
@ -5363,12 +5363,12 @@
}
},
"node_modules/heap-typed": {
"version": "1.51.7",
"resolved": "https://registry.npmjs.org/heap-typed/-/heap-typed-1.51.7.tgz",
"integrity": "sha512-afq4w+3kDff5Axdt4ZsS4tTMKFb7sCRblk0+8vmGRNQcJ8wHnZIdTEmXmHY5xVLq/84lSayMgct7hyKp8II0LA==",
"version": "1.51.8",
"resolved": "https://registry.npmjs.org/heap-typed/-/heap-typed-1.51.8.tgz",
"integrity": "sha512-H/Csv4n9hw+qhgnDDXCff4VMZZ+XSxbnteXjiFBGHV5xeYbSiygbvbTfWe9TOTunIht+Ae/zp0SagfHcAI+9hg==",
"dev": true,
"dependencies": {
"data-structure-typed": "^1.51.7"
"data-structure-typed": "^1.51.8"
}
},
"node_modules/html-escaper": {

View file

@ -1,6 +1,6 @@
{
"name": "data-structure-typed",
"version": "1.51.8",
"version": "1.51.9",
"description": "Javascript Data Structure. Heap, Binary Tree, Red Black Tree, Linked List, Deque, Trie, HashMap, Directed Graph, Undirected Graph, Binary Search Tree(BST), AVL Tree, Priority Queue, Graph, Queue, Tree Multiset, Singly Linked List, Doubly Linked List, Max Heap, Max Priority Queue, Min Heap, Min Priority Queue, Stack. Benchmark compared with C++ STL. API aligned with ES6 and Java.util. Usability is comparable to Python",
"main": "dist/cjs/index.js",
"module": "dist/mjs/index.js",
@ -66,11 +66,11 @@
"@typescript-eslint/eslint-plugin": "^6.7.4",
"@typescript-eslint/parser": "^6.7.4",
"auto-changelog": "^2.4.0",
"avl-tree-typed": "^1.51.7",
"avl-tree-typed": "^1.51.8",
"benchmark": "^2.1.4",
"binary-tree-typed": "^1.51.7",
"bst-typed": "^1.51.7",
"data-structure-typed": "^1.51.7",
"binary-tree-typed": "^1.51.8",
"bst-typed": "^1.51.8",
"data-structure-typed": "^1.51.8",
"dependency-cruiser": "^14.1.0",
"doctoc": "^2.2.1",
"eslint": "^8.50.0",
@ -79,7 +79,7 @@
"eslint-import-resolver-typescript": "^3.6.1",
"eslint-plugin-import": "^2.28.1",
"fast-glob": "^3.3.1",
"heap-typed": "^1.51.7",
"heap-typed": "^1.51.8",
"istanbul-badges-readme": "^1.8.5",
"jest": "^29.7.0",
"js-sdsl": "^4.4.2",

View file

@ -20,7 +20,7 @@ describe('AVL Tree Test', () => {
[10, 10],
[5, 5]
];
const tree = new AVLTree();
const tree = new AVLTree<number, number>();
for (const i of arr) tree.add(i);
@ -44,7 +44,7 @@ describe('AVL Tree Test', () => {
expect(subTreeSum).toBe(70);
let lesserSum = 0;
tree.lesserOrGreaterTraverse(node => (lesserSum += node.key), 'LT', 10);
tree.lesserOrGreaterTraverse(node => (lesserSum += node.key), -1, 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.

View file

@ -2,7 +2,7 @@ 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();
const bst = new BST<number>();
expect(bst).toBeInstanceOf(BST);
bst.add([11, 11]);
bst.add([3, 3]);
@ -38,7 +38,7 @@ describe('Individual package BST operations test', () => {
expect(subTreeSum).toBe(70);
let lesserSum = 0;
bst.lesserOrGreaterTraverse(node => (lesserSum += node.key), 'LT', 10);
bst.lesserOrGreaterTraverse(node => (lesserSum += node.key), -1, 10);
expect(lesserSum).toBe(45);
expect(node15).toBeInstanceOf(BSTNode);
@ -235,7 +235,7 @@ describe('Individual package BST operations test', () => {
expect(subTreeSum).toBe(70);
let lesserSum = 0;
objBST.lesserOrGreaterTraverse(node => (lesserSum += node.key), 'LT', 10);
objBST.lesserOrGreaterTraverse(node => (lesserSum += node.key), -1, 10);
expect(lesserSum).toBe(45);
expect(node15).toBeInstanceOf(BSTNode);